Change ContentObserver for Account; fix two bugs

* Fixes 2085862 and 2087385

Change-Id: I38e046e861ec0423669506194c0bcd6c9c96328c
This commit is contained in:
Marc Blank 2009-08-30 17:29:32 -07:00
parent 617720eb35
commit b3e4c79873

View File

@ -383,8 +383,8 @@ public class SyncManager extends Service implements Runnable {
stopAccountSyncs(account.mId, true); stopAccountSyncs(account.mId, true);
// Delete this from AccountManager... // Delete this from AccountManager...
android.accounts.Account acct = android.accounts.Account acct =
new android.accounts.Account(Eas.ACCOUNT_MANAGER_TYPE, new android.accounts.Account(account.mEmailAddress,
account.mEmailAddress); Eas.ACCOUNT_MANAGER_TYPE);
AccountManager.get(SyncManager.this).removeAccount(acct, null, null); AccountManager.get(SyncManager.this).removeAccount(acct, null, null);
} else { } else {
// See whether any of our accounts has changed sync interval or window // See whether any of our accounts has changed sync interval or window
@ -665,7 +665,7 @@ public class SyncManager extends Service implements Runnable {
} }
mResolver = getContentResolver(); mResolver = getContentResolver();
mAccountObserver = new AccountObserver(mHandler); mAccountObserver = new AccountObserver(mHandler);
mResolver.registerContentObserver(Account.CONTENT_URI, false, mAccountObserver); mResolver.registerContentObserver(Account.CONTENT_URI, true, mAccountObserver);
mMailboxObserver = new MailboxObserver(mHandler); mMailboxObserver = new MailboxObserver(mHandler);
mSyncedMessageObserver = new SyncedMessageObserver(mHandler); mSyncedMessageObserver = new SyncedMessageObserver(mHandler);
mMessageObserver = new MessageObserver(mHandler); mMessageObserver = new MessageObserver(mHandler);