Add null check for sync authorities of an account type

This protects against a potential NPE if there are no sync authorities for
an account of a given type.

Bug: 17612697
Change-Id: Ifd34b5b7692cbcc8de78d353eedd284e499f954e
This commit is contained in:
Alexandra Gherghina
2014-09-24 11:29:48 +01:00
parent 3156e38f5e
commit 7f279cef11
2 changed files with 24 additions and 15 deletions

View File

@@ -190,10 +190,10 @@ final public class AuthenticatorHelper extends BroadcastReceiver {
mEnabledAccountTypes.add(account.type);
}
}
buildAccountTypeToAuthoritiesMap();
if (mListeningToAccountUpdates) {
mListener.onAccountsUpdate(mUserHandle);
}
buildAccountTypeToAuthoritiesMap();
}
@Override