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

Commit bcfb075f authored by Hai Zhang's avatar Hai Zhang
Browse files

Watch app ops for all runtime permissions.

So that we synchronize on them.

Bug: 136503238
Test: Try manually set app ops for runtime permissions
Change-Id: I2fe255caff13643e0b8493e12a149eaa32e06c13
parent 1e652863
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -152,10 +152,10 @@ public final class PermissionPolicyService extends SystemService {
            for (int i = 0; i < numDangerousPerms; i++) {
                PermissionInfo perm = dangerousPerms.get(i);

                if (perm.isHardRestricted() || perm.backgroundPermission != null) {
                    appOpsService.startWatchingMode(getSwitchOp(perm.name), null, appOpsListener);
                } else if (perm.isSoftRestricted()) {
                if (perm.isRuntime()) {
                    appOpsService.startWatchingMode(getSwitchOp(perm.name), null, appOpsListener);
                }
                if (perm.isSoftRestricted()) {
                    SoftRestrictedPermissionPolicy policy =
                            SoftRestrictedPermissionPolicy.forPermission(null, null, null,
                                    perm.name);