am 298de218: am 0ce8431c: Merge change Iaa7edda4 into eclair

Merge commit '298de218c540eab6c4e6c3415ab8a5c985c57772' into eclair-mr2-plus-aosp

* commit '298de218c540eab6c4e6c3415ab8a5c985c57772':
  don't reschedule syncs that failed with a tooManyRetries error
This commit is contained in:
Fred Quintana
2009-12-03 17:25:36 -08:00
committed by Android Git Automerger

View File

@@ -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");