diff options
author | Fred Quintana <fredq@google.com> | 2009-12-03 14:18:58 -0800 |
---|---|---|
committer | Fred Quintana <fredq@google.com> | 2009-12-03 14:18:58 -0800 |
commit | aa7edda4719dc0accbc29ff917b4280f6b600675 (patch) | |
tree | f35df42b80eca9d0b58a7b8d0046c6995f4b4d9c /core/java/android/content | |
parent | db08d5cd441424e4f9621aae7c2414934f781400 (diff) | |
download | frameworks_base-aa7edda4719dc0accbc29ff917b4280f6b600675.zip frameworks_base-aa7edda4719dc0accbc29ff917b4280f6b600675.tar.gz frameworks_base-aa7edda4719dc0accbc29ff917b4280f6b600675.tar.bz2 |
don't reschedule syncs that failed with a tooManyRetries error
Diffstat (limited to 'core/java/android/content')
-rw-r--r-- | core/java/android/content/SyncManager.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/core/java/android/content/SyncManager.java b/core/java/android/content/SyncManager.java index ba18615..b2d406b 100644 --- a/core/java/android/content/SyncManager.java +++ b/core/java/android/content/SyncManager.java @@ -919,12 +919,16 @@ class SyncManager implements OnAccountsUpdateListener { + previousSyncOperation); } + // If this sync aborted because the internal sync loop retried too many times then + // don't reschedule. Otherwise we risk getting into a retry loop. // If the operation succeeded to some extent then retry immediately. // If this was a two-way sync then retry soft errors with an exponential backoff. // If this was an upward sync then schedule a two-way sync immediately. // Otherwise do not reschedule. - - if (syncResult.madeSomeProgress()) { + if (syncResult.tooManyRetries) { + Log.d(TAG, "not retrying sync operation because it retried too many times: " + + previousSyncOperation); + } else if (syncResult.madeSomeProgress()) { if (isLoggable) { Log.d(TAG, "retrying sync operation immediately because " + "even though it had an error it achieved some success"); |