Invalidate accounts cache on permissions change
Bug: 190799774 Test: Verified that invalidation happens when permissions change. Change-Id: I79bf7315b77995aacbf3e8d423f33c78e669c7d9
This commit is contained in:
committed by
Edgar Arriaga García
parent
77ea3710bb
commit
78a2ed60e0
@@ -375,6 +375,9 @@ public class AccountManagerService
|
||||
// Cancel account request notification if a permission was preventing the account access
|
||||
mPackageManager.addOnPermissionsChangeListener(
|
||||
(int uid) -> {
|
||||
// Permission changes cause requires updating accounts cache.
|
||||
AccountManager.invalidateLocalAccountsDataCaches();
|
||||
|
||||
Account[] accounts = null;
|
||||
String[] packageNames = mPackageManager.getPackagesForUid(uid);
|
||||
if (packageNames != null) {
|
||||
|
||||
Reference in New Issue
Block a user