From c522cfa77099bb8f65b65ad49b7781cf3bb86002 Mon Sep 17 00:00:00 2001 From: Marc Blank Date: Thu, 10 Sep 2009 12:26:26 -0700 Subject: [PATCH] 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 --- src/com/android/exchange/EasSyncService.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/com/android/exchange/EasSyncService.java b/src/com/android/exchange/EasSyncService.java index 7c1e3ae36..be250b692 100644 --- a/src/com/android/exchange/EasSyncService.java +++ b/src/com/android/exchange/EasSyncService.java @@ -808,10 +808,10 @@ public class EasSyncService extends AbstractSyncService { } } } else if (pushCount > 0) { - // If we want to Ping, but can't just yet, wait 10 seconds and try again - // No point giving up the wake lock for 10 seconds... + // If we want to Ping, but can't just yet, wait a little bit + // TODO Change sleep to wait and use notify from SyncManager when a sync ends userLog("pingLoop waiting for: ", (pushCount - canPushCount), " box(es)"); - sleep(10*SECONDS); + sleep(1*SECONDS); } else { // 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...