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

Commit 78a2ed60 authored by Edgar Arriaga's avatar Edgar Arriaga Committed by Edgar Arriaga García
Browse files

Invalidate accounts cache on permissions change

Bug: 190799774
Test: Verified that invalidation happens when permissions change.
Change-Id: I79bf7315b77995aacbf3e8d423f33c78e669c7d9
parent 77ea3710
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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) {