Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0e592733 authored by Benjamin Franz's avatar Benjamin Franz
Browse files

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
parent fa272e5c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
                }