Merge "Invalidate accounts cache on permissions change" into sc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
65a8530ccc
@@ -375,6 +375,9 @@ public class AccountManagerService
|
|||||||
// Cancel account request notification if a permission was preventing the account access
|
// Cancel account request notification if a permission was preventing the account access
|
||||||
mPackageManager.addOnPermissionsChangeListener(
|
mPackageManager.addOnPermissionsChangeListener(
|
||||||
(int uid) -> {
|
(int uid) -> {
|
||||||
|
// Permission changes cause requires updating accounts cache.
|
||||||
|
AccountManager.invalidateLocalAccountsDataCaches();
|
||||||
|
|
||||||
Account[] accounts = null;
|
Account[] accounts = null;
|
||||||
String[] packageNames = mPackageManager.getPackagesForUid(uid);
|
String[] packageNames = mPackageManager.getPackagesForUid(uid);
|
||||||
if (packageNames != null) {
|
if (packageNames != null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user