Change ping loop wait from 10s to 1s to reduce WakeLock use

* There is a better way of implementing this, which I'll write up in
  Buganizer, but this will help our battery life testing

Change-Id: I2583f0cb9c62b38aee64166138385d7b14855832
This commit is contained in:
Marc Blank 2009-09-10 12:26:26 -07:00
parent ffe998914d
commit c522cfa770

View File

@ -808,10 +808,10 @@ public class EasSyncService extends AbstractSyncService {
} }
} }
} else if (pushCount > 0) { } else if (pushCount > 0) {
// If we want to Ping, but can't just yet, wait 10 seconds and try again // If we want to Ping, but can't just yet, wait a little bit
// No point giving up the wake lock for 10 seconds... // TODO Change sleep to wait and use notify from SyncManager when a sync ends
userLog("pingLoop waiting for: ", (pushCount - canPushCount), " box(es)"); userLog("pingLoop waiting for: ", (pushCount - canPushCount), " box(es)");
sleep(10*SECONDS); sleep(1*SECONDS);
} else { } else {
// We've got nothing to do, so we'll check again in 30 minutes at which time // We've got nothing to do, so we'll check again in 30 minutes at which time
// we'll update the folder list. Let the device sleep in the meantime... // we'll update the folder list. Let the device sleep in the meantime...