diff options
| author | 2009-12-03 17:10:59 -0800 | |
|---|---|---|
| committer | 2009-12-03 17:10:59 -0800 | |
| commit | 0ce8431c15078e095a22a123dbabcd91049a9652 (patch) | |
| tree | 1a21436c3f70daaab497852f6040e20436591509 | |
| parent | 5c49a9080df9e46193efa8326318c86bc8976eea (diff) | |
| parent | aa7edda4719dc0accbc29ff917b4280f6b600675 (diff) | |
Merge change Iaa7edda4 into eclair
* changes:
don't reschedule syncs that failed with a tooManyRetries error
| -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 ba186159680d..b2d406b5e7c5 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"); |