From 41bba664f72a4779f417b828ba3f62055d91fcb7 Mon Sep 17 00:00:00 2001 From: Marc Blank Date: Wed, 25 Jul 2012 15:35:30 -0700 Subject: [PATCH] Fix EAS backoff behavior (was stuck at 30 seconds) Bug: 6881519 Change-Id: Ib0b6f8a07a4bc47d3691c9cfa711e45eaf1955f2 --- emailsync/src/com/android/emailsync/SyncManager.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/emailsync/src/com/android/emailsync/SyncManager.java b/emailsync/src/com/android/emailsync/SyncManager.java index 0f1ed3b0c..db13e7e8f 100644 --- a/emailsync/src/com/android/emailsync/SyncManager.java +++ b/emailsync/src/com/android/emailsync/SyncManager.java @@ -34,7 +34,6 @@ import android.net.NetworkInfo; import android.net.NetworkInfo.State; import android.net.Uri; import android.os.Bundle; -import android.os.Debug; import android.os.Handler; import android.os.PowerManager; import android.os.PowerManager.WakeLock; @@ -758,10 +757,10 @@ public abstract class SyncManager extends Service implements Runnable { } /** - * We double the holdDelay from 15 seconds through 4 mins + * We double the holdDelay from 15 seconds through 8 mins */ void escalate() { - if (holdDelay < HOLD_DELAY_MAXIMUM) { + if (holdDelay <= HOLD_DELAY_MAXIMUM) { holdDelay *= 2; } holdEndTime = System.currentTimeMillis() + holdDelay; @@ -2195,6 +2194,7 @@ public abstract class SyncManager extends Service implements Runnable { if (syncError != null) { syncError.escalate(); log(m.mDisplayName + " held for " + syncError.holdDelay + "ms"); + return; } else { log(m.mDisplayName + " added to syncErrorMap, hold for 15s"); }