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: Haohua Li <lihaohua90@gmail.com>
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user