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

Commit 0024b8f4 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Don't lock database when token is read from customToken cache in AccountManagerService."

parents e18d3ba0 18f0ca97
Loading
Loading
Loading
Loading
+3 −5
Original line number Original line Diff line number Diff line
@@ -5917,13 +5917,11 @@ public class AccountManagerService
            String tokenType,
            String tokenType,
            String callingPackage,
            String callingPackage,
            byte[] pkgSigDigest) {
            byte[] pkgSigDigest) {
        synchronized (accounts.dbLock) {
        synchronized (accounts.cacheLock) {
        synchronized (accounts.cacheLock) {
            return accounts.accountTokenCaches.get(
            return accounts.accountTokenCaches.get(
                    account, tokenType, callingPackage, pkgSigDigest);
                    account, tokenType, callingPackage, pkgSigDigest);
        }
        }
    }
    }
    }


    /** protected by the {@code dbLock}, {@code cacheLock} */
    /** protected by the {@code dbLock}, {@code cacheLock} */
    protected void writeAuthTokenIntoCacheLocked(UserAccounts accounts,
    protected void writeAuthTokenIntoCacheLocked(UserAccounts accounts,