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

Commit 33b7a37d authored by Hai Zhang's avatar Hai Zhang
Browse files

Don't kill app upon non-permission app op change.

We wasn't killing apps for non-permission app ops, and some of these
app ops (e.g. run in background) shouldn't restart the app at all.

Bug: 124452117
Bug: 131252995
Test: presubmit
Change-Id: If9a7b5d332a1c5e5285c7d4372759878c715d95a
parent da2bd223
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -557,7 +557,7 @@ public class Role {
        int appOpsSize = mAppOps.size();
        for (int i = 0; i < appOpsSize; i++) {
            AppOp appOp = mAppOps.get(i);
            permissionOrAppOpChanged |= appOp.grant(packageName, context);
            appOp.grant(packageName, context);
        }

        int preferredActivitiesSize = mPreferredActivities.size();
@@ -610,7 +610,7 @@ public class Role {
        int appOpsSize = appOpsToRevoke.size();
        for (int i = 0; i < appOpsSize; i++) {
            AppOp appOp = appOpsToRevoke.get(i);
            permissionOrAppOpChanged |= appOp.revoke(packageName, context);
            appOp.revoke(packageName, context);
        }

        // TODO: STOPSHIP: Revoke preferred activities?