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

Commit 012117e8 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Watch app ops for all runtime permissions."

parents 7bdf98eb bcfb075f
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -152,10 +152,10 @@ public final class PermissionPolicyService extends SystemService {
            for (int i = 0; i < numDangerousPerms; i++) {
            for (int i = 0; i < numDangerousPerms; i++) {
                PermissionInfo perm = dangerousPerms.get(i);
                PermissionInfo perm = dangerousPerms.get(i);


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