From 9d91dd8023b31f37c0aade7bf6d9910908204a94 Mon Sep 17 00:00:00 2001 From: Yu Ping Hu Date: Tue, 12 Mar 2013 12:38:01 -0700 Subject: [PATCH] Specify correct sync extras for user-requested syncs. BUG: 8364227 Change-Id: Icfc97c92e5ecc9c2abd83b73cf67a5e10408cede --- src/com/android/email/service/EmailServiceStub.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/com/android/email/service/EmailServiceStub.java b/src/com/android/email/service/EmailServiceStub.java index 68a02b427..84964b083 100644 --- a/src/com/android/email/service/EmailServiceStub.java +++ b/src/com/android/email/service/EmailServiceStub.java @@ -111,7 +111,11 @@ public abstract class EmailServiceStub extends IEmailService.Stub implements IEm android.accounts.Account acct = new android.accounts.Account(account.mEmailAddress, info.accountType); Bundle extras = new Bundle(); - extras.putBoolean(ContentResolver.SYNC_EXTRAS_EXPEDITED, true); + if (userRequest) { + extras.putBoolean(ContentResolver.SYNC_EXTRAS_MANUAL, true); + extras.putBoolean(ContentResolver.SYNC_EXTRAS_DO_NOT_RETRY, true); + extras.putBoolean(ContentResolver.SYNC_EXTRAS_EXPEDITED, true); + } extras.putLong(SYNC_EXTRA_MAILBOX_ID, mailboxId); ContentResolver.requestSync(acct, EmailContent.AUTHORITY, extras); }