diff options
| author | Presubmit Automerger Backend <android-build-presubmit-automerger-backend@system.gserviceaccount.com> | 2022-07-11 21:20:52 +0000 |
|---|---|---|
| committer | Presubmit Automerger Backend <android-build-presubmit-automerger-backend@system.gserviceaccount.com> | 2022-07-11 21:20:52 +0000 |
| commit | b919b8077f48574dd601d6136a11b01c626fe3fe (patch) | |
| tree | cea9feb873b92504b7f6c2741dcf628113b2a7b2 /core/java | |
| parent | ed729f2dd1eb03f7f4ac8640be289ff1e8fe7686 (diff) | |
| parent | de7b0f6dd071617724e4ac3a1c1451d05054008f (diff) | |
[automerge] DO NOT MERGE: Revert "Make CheckOp return allowed if any attr tag for a package is excluded" 2p: de7b0f6dd0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19245451
Bug: 231496105
Change-Id: I02054942e9b0b3df13dc322c6ef368d024645b98
Diffstat (limited to 'core/java')
| -rw-r--r-- | core/java/android/app/AppOpsManager.java | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/core/java/android/app/AppOpsManager.java b/core/java/android/app/AppOpsManager.java index fc89e1395073..d932a29beca6 100644 --- a/core/java/android/app/AppOpsManager.java +++ b/core/java/android/app/AppOpsManager.java @@ -2463,8 +2463,8 @@ public class AppOpsManager { * restriction} for a certain app-op. */ private static RestrictionBypass[] sOpAllowSystemRestrictionBypass = new RestrictionBypass[] { - new RestrictionBypass(true, false, false), //COARSE_LOCATION - new RestrictionBypass(true, false, false), //FINE_LOCATION + new RestrictionBypass(true, false), //COARSE_LOCATION + new RestrictionBypass(true, false), //FINE_LOCATION null, //GPS null, //VIBRATE null, //READ_CONTACTS @@ -2473,7 +2473,7 @@ public class AppOpsManager { null, //WRITE_CALL_LOG null, //READ_CALENDAR null, //WRITE_CALENDAR - new RestrictionBypass(false, true, false), //WIFI_SCAN + new RestrictionBypass(true, false), //WIFI_SCAN null, //POST_NOTIFICATION null, //NEIGHBORING_CELLS null, //CALL_PHONE @@ -2487,10 +2487,10 @@ public class AppOpsManager { null, //READ_ICC_SMS null, //WRITE_ICC_SMS null, //WRITE_SETTINGS - new RestrictionBypass(false, true, false), //SYSTEM_ALERT_WINDOW + new RestrictionBypass(true, false), //SYSTEM_ALERT_WINDOW null, //ACCESS_NOTIFICATIONS null, //CAMERA - new RestrictionBypass(false, false, true), //RECORD_AUDIO + new RestrictionBypass(false, true), //RECORD_AUDIO null, //PLAY_AUDIO null, //READ_CLIPBOARD null, //WRITE_CLIPBOARD @@ -2508,7 +2508,7 @@ public class AppOpsManager { null, //MONITOR_HIGH_POWER_LOCATION null, //GET_USAGE_STATS null, //MUTE_MICROPHONE - new RestrictionBypass(false, true, false), //TOAST_WINDOW + new RestrictionBypass(true, false), //TOAST_WINDOW null, //PROJECT_MEDIA null, //ACTIVATE_VPN null, //WALLPAPER @@ -2540,7 +2540,7 @@ public class AppOpsManager { null, // ACCEPT_HANDOVER null, // MANAGE_IPSEC_HANDOVERS null, // START_FOREGROUND - new RestrictionBypass(false, true, false), // BLUETOOTH_SCAN + new RestrictionBypass(true, false), // BLUETOOTH_SCAN null, // USE_BIOMETRIC null, // ACTIVITY_RECOGNITION null, // SMS_FINANCIAL_TRANSACTIONS @@ -3105,9 +3105,6 @@ public class AppOpsManager { * @hide */ public static class RestrictionBypass { - /** Does the app need to be system uid to bypass the restriction */ - public boolean isSystemUid; - /** Does the app need to be privileged to bypass the restriction */ public boolean isPrivileged; @@ -3117,14 +3114,12 @@ public class AppOpsManager { */ public boolean isRecordAudioRestrictionExcept; - public RestrictionBypass(boolean isSystemUid, boolean isPrivileged, - boolean isRecordAudioRestrictionExcept) { - this.isSystemUid = isSystemUid; + public RestrictionBypass(boolean isPrivileged, boolean isRecordAudioRestrictionExcept) { this.isPrivileged = isPrivileged; this.isRecordAudioRestrictionExcept = isRecordAudioRestrictionExcept; } - public static RestrictionBypass UNRESTRICTED = new RestrictionBypass(false, true, true); + public static RestrictionBypass UNRESTRICTED = new RestrictionBypass(true, true); } /** |
