Specify correct sync extras for user-requested syncs.

BUG: 8364227
Change-Id: Icfc97c92e5ecc9c2abd83b73cf67a5e10408cede
This commit is contained in:
Yu Ping Hu 2013-03-12 12:38:01 -07:00
parent 258776d784
commit 9d91dd8023

View File

@ -111,7 +111,11 @@ public abstract class EmailServiceStub extends IEmailService.Stub implements IEm
android.accounts.Account acct = new android.accounts.Account(account.mEmailAddress, android.accounts.Account acct = new android.accounts.Account(account.mEmailAddress,
info.accountType); info.accountType);
Bundle extras = new Bundle(); Bundle extras = new Bundle();
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.putBoolean(ContentResolver.SYNC_EXTRAS_EXPEDITED, true);
}
extras.putLong(SYNC_EXTRA_MAILBOX_ID, mailboxId); extras.putLong(SYNC_EXTRA_MAILBOX_ID, mailboxId);
ContentResolver.requestSync(acct, EmailContent.AUTHORITY, extras); ContentResolver.requestSync(acct, EmailContent.AUTHORITY, extras);
} }