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

Commit 18f0ca97 authored by Dmitry Dementyev's avatar Dmitry Dementyev
Browse files

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

Test: manual
Bug: 62546889
Change-Id: I9350a5829887de7bc28bfbb0f5bb7392ee727fb0
parent ce65c84f
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,