Make certain we don't use a null account.

Bug: 10965484
Change-Id: I525d32fcbde0fbbe0bec467814cf4f09a3de38fe
This commit is contained in:
Yu Ping Hu 2013-09-29 16:32:28 -07:00
parent 85ad73aecd
commit 125cbdf9d4

View File

@ -5249,10 +5249,13 @@ public class EmailProvider extends ContentProvider {
public boolean handleMessage(android.os.Message msg) {
synchronized (mDelayedSyncRequests) {
final SyncRequestMessage request = (SyncRequestMessage) msg.obj;
final android.accounts.Account account =
getAccountManagerAccount(request.mAccountId);
if (account != null) {
final Bundle extras = new Bundle();
extras.putLong(Mailbox.SYNC_EXTRA_MAILBOX_ID, request.mMailboxId);
ContentResolver.requestSync(getAccountManagerAccount(request.mAccountId),
request.mAuthority, extras);
ContentResolver.requestSync(account, request.mAuthority, extras);
}
mDelayedSyncRequests.remove(request);
return true;
}