Fix a bug where we'd add a null entry to the computer list

This commit is contained in:
Cameron Gutman 2014-08-05 23:44:04 -07:00
parent e8fd1f262a
commit 2918039b6f

View File

@ -410,8 +410,8 @@ public class ComputerManagerService extends Service {
dbManager.updateComputer(details);
}
// Update anyone listening
if (listener != null) {
// Don't call the listener if this is a failed lookup of a new PC
if ((!newPc || details.state == ComputerDetails.State.ONLINE) && listener != null) {
listener.notifyComputerUpdated(details);
}