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
This commit is contained in:
Matthew Williams
2014-08-25 17:59:52 -07:00
parent ad3fc40737
commit 3c8a42ddd9

View File

@@ -2757,9 +2757,7 @@ public class SyncManager {
} 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(