Don't back-off ALREADY_IN_PROGRESS syncs
BUG: 16219182
The issue is that some adapters get into a bad state where
SyncManager assumes them complete yet they are still going. This
result in ALREADY_IN_PROGRESS coming back from the adapter, the
default retry-time for which is about 10s.
Subject ALREADY_IN_PROGRESS to exponential back-off to avoid waking
up SM every ~10 seconds
Change-Id: I6cef787366436c678bac762ec6daf6212f04badc
diff --git a/services/core/java/com/android/server/content/SyncManager.java b/services/core/java/com/android/server/content/SyncManager.java
index 949019e..7a1b03c 100644
--- a/services/core/java/com/android/server/content/SyncManager.java
+++ b/services/core/java/com/android/server/content/SyncManager.java
@@ -2757,9 +2757,7 @@
} else {
Log.d(TAG, "failed sync operation " + syncOperation + ", " + syncResult);
// the operation failed so increase the backoff time
- if (!syncResult.syncAlreadyInProgress) {
- increaseBackoffSetting(syncOperation);
- }
+ increaseBackoffSetting(syncOperation);
// reschedule the sync if so indicated by the syncResult
maybeRescheduleSync(syncResult, syncOperation);
historyMessage = ContentResolver.syncErrorToString(