Use UserAccounts handed into accountExistsCacheLocked
Use the object we get handed rather than obtaining the one for the calling user. We're previously clearing the caller, so the calling user might not be the same as the one we used to obtain accounts object. Bug: 27285299 Change-Id: Ie384bca83779593f6569bccea3c2851083ace31d
This commit is contained in:
@@ -1734,7 +1734,7 @@ public class AccountManagerService
|
||||
|
||||
private boolean accountExistsCacheLocked(UserAccounts accounts, Account account) {
|
||||
if (accounts.accountCache.containsKey(account.type)) {
|
||||
for (Account acc : getUserAccountsForCaller().accountCache.get(account.type)) {
|
||||
for (Account acc : accounts.accountCache.get(account.type)) {
|
||||
if (acc.name.equals(account.name)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user