From 807f4cfc80728313d04f95343e5aea14691aceb0 Mon Sep 17 00:00:00 2001 From: Evan Severson Date: Fri, 29 Apr 2022 14:13:29 -0700 Subject: [PATCH] Disallow privileged apps to bypass location restriction This bypass was originally allowed to let restricted users who can't use location to pair bluetooth devices. This isn't needed anymore with the bluetooth permissions. Test: Set up restricted profile and pair bluetooth Verify com.android.phone gets rejected Bug: 230861324 Bug: 231496105 Merged-In: Ib34c0b56ef52f5ee2deceb84b02cd0ff73d8181d Change-Id: Ib34c0b56ef52f5ee2deceb84b02cd0ff73d8181d --- core/java/android/app/AppOpsManager.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/java/android/app/AppOpsManager.java b/core/java/android/app/AppOpsManager.java index d932a29beca61..643df9240de91 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), //COARSE_LOCATION - new RestrictionBypass(true, false), //FINE_LOCATION + null, //COARSE_LOCATION + null, //FINE_LOCATION null, //GPS null, //VIBRATE null, //READ_CONTACTS