summaryrefslogtreecommitdiffstats
path: root/core/java/android/content/SyncManager.java
diff options
context:
space:
mode:
authorFred Quintana <fredq@google.com>2009-12-03 17:17:00 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2009-12-03 17:17:00 -0800
commit298de218c540eab6c4e6c3415ab8a5c985c57772 (patch)
tree93ee1490a18780dd52d5f67d106dc5e250e6eece /core/java/android/content/SyncManager.java
parent2a428fd463431e2b3d3680faf2e9640989ca7791 (diff)
parent0ce8431c15078e095a22a123dbabcd91049a9652 (diff)
downloadframeworks_base-298de218c540eab6c4e6c3415ab8a5c985c57772.zip
frameworks_base-298de218c540eab6c4e6c3415ab8a5c985c57772.tar.gz
frameworks_base-298de218c540eab6c4e6c3415ab8a5c985c57772.tar.bz2
am 0ce8431c: Merge change Iaa7edda4 into eclair
Merge commit '0ce8431c15078e095a22a123dbabcd91049a9652' into eclair-mr2 * commit '0ce8431c15078e095a22a123dbabcd91049a9652': don't reschedule syncs that failed with a tooManyRetries error
Diffstat (limited to 'core/java/android/content/SyncManager.java')
-rw-r--r--core/java/android/content/SyncManager.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/core/java/android/content/SyncManager.java b/core/java/android/content/SyncManager.java
index 1580c66..0589ce6 100644
--- a/core/java/android/content/SyncManager.java
+++ b/core/java/android/content/SyncManager.java
@@ -957,12 +957,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");