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

Commit f3880fdc authored by Haohua Li's avatar Haohua Li
Browse files

Fix wrong variable in AccountManagerService's TokenCache



// mAccountEvictors.put(k.account, tokenEvictor);
// should be:
mAccountEvictors.put(k.account, accountEvictor);

This error in putToken() method causes the confusion of mAccountEvictors,
and may causes the evict() method does not clean up the cache data correctly.

Change-Id: I9435c206a6fa4d90177bbbe8816004365a213d1b
Signed-off-by: default avatarHaohua Li <lihaohua90@gmail.com>
parent 31145f45
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -148,7 +148,7 @@ import java.util.Objects;
                accountEvictor = new Evictor();
            }
            accountEvictor.add(k);
            mAccountEvictors.put(k.account, tokenEvictor);
            mAccountEvictors.put(k.account, accountEvictor);

            // Only cache the token once we can remove it directly or by account.
            put(k, v);