summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Philip P. Moltmann <moltmann@google.com> 2020-02-13 13:16:13 -0800
committer Philip P. Moltmann <moltmann@google.com> 2020-02-13 14:44:39 -0800
commit87fd8bc84b15cde8800eeda95b254227171d87fe (patch)
tree4c3913952a1e21ca7e13cc1a789ad4c9b096b12e
parent6d075f0daba8a7517db9349ca6efcdeec1df77a2 (diff)
Track noted app-ops for appop permissions
Test: Built Bug: 10319596 Change-Id: Ia8e3dddbcd4aa28919ede9401bbf3d7d64e2ced5
-rw-r--r--services/core/java/com/android/server/appop/AppOpsService.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/appop/AppOpsService.java b/services/core/java/com/android/server/appop/AppOpsService.java
index 6911e640a0c7..d73eee63d60d 100644
--- a/services/core/java/com/android/server/appop/AppOpsService.java
+++ b/services/core/java/com/android/server/appop/AppOpsService.java
@@ -56,6 +56,7 @@ import static android.app.AppOpsManager.resolveFirstUnrestrictedUidState;
import static android.content.Intent.ACTION_PACKAGE_REMOVED;
import static android.content.Intent.EXTRA_REPLACING;
import static android.content.pm.PermissionInfo.PROTECTION_DANGEROUS;
+import static android.content.pm.PermissionInfo.PROTECTION_FLAG_APPOP;
import static com.android.server.appop.AppOpsService.ModeCallback.ALL_OPS;
@@ -3365,7 +3366,8 @@ public class AppOpsService extends IAppOpsService.Stub {
return false;
}
- return permInfo.getProtection() == PROTECTION_DANGEROUS;
+ return permInfo.getProtection() == PROTECTION_DANGEROUS
+ || (permInfo.getProtectionFlags() & PROTECTION_FLAG_APPOP) != 0;
}
private void verifyIncomingUid(int uid) {