am 468fe91d
: Prevent account reconcile from running when service is down
Merge commit '468fe91dd8d3f7c35a2ecd4187dcc38c2e5ad1cc' into froyo-plus-aosp * commit '468fe91dd8d3f7c35a2ecd4187dcc38c2e5ad1cc': Prevent account reconcile from running when service is down
This commit is contained in:
commit
c9f923959e
@ -954,14 +954,16 @@ public class SyncManager extends Service implements Runnable {
|
||||
android.accounts.Account[] accountMgrList = AccountManager.get(syncManager)
|
||||
.getAccountsByType(Email.EXCHANGE_ACCOUNT_MANAGER_TYPE);
|
||||
synchronized (sAccountList) {
|
||||
// Make sure we have an up-to-date sAccountList
|
||||
// Make sure we have an up-to-date sAccountList. If not (for example, if the
|
||||
// service has been destroyed), we would be reconciling against an empty account
|
||||
// list, which would cause the deletion of all of our accounts
|
||||
if (mAccountObserver != null) {
|
||||
mAccountObserver.onAccountChanged();
|
||||
}
|
||||
reconcileAccountsWithAccountManager(syncManager, sAccountList,
|
||||
accountMgrList, false, mResolver);
|
||||
}
|
||||
}
|
||||
}
|
||||
}.start();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user