Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 298de218 authored by Fred Quintana's avatar Fred Quintana Committed by Android Git Automerger
Browse files

am 0ce8431c: Merge change Iaa7edda4 into eclair

Merge commit '0ce8431c' into eclair-mr2

* commit '0ce8431c':
  don't reschedule syncs that failed with a tooManyRetries error
parents 2a428fd4 0ce8431c
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -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");