Merge "Don't sync at all if 1) upsync and 2) held" into jb-ub-mail

This commit is contained in:
Marc Blank 2012-09-11 18:12:15 -07:00 committed by Android (Google) Code Review
commit d14bb10700
1 changed files with 3 additions and 1 deletions

View File

@ -2077,7 +2077,9 @@ public abstract class SyncManager extends Service implements Runnable {
synchronized (sSyncLock) {
AbstractSyncService svc = ssm.mServiceMap.get(mailboxId);
if (svc == null) {
if (reason != SyncManager.SYNC_UPSYNC) {
if (ssm.mSyncErrorMap.containsKey(mailboxId) && reason == SyncManager.SYNC_UPSYNC) {
return;
} else if (reason != SyncManager.SYNC_UPSYNC) {
ssm.mSyncErrorMap.remove(mailboxId);
}
Mailbox m = Mailbox.restoreMailboxWithId(ssm, mailboxId);