From 530407c903c3b06c6bd0a423937531f95eb116ae 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 Fixes: 230861324 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 6e395be215b5e..c7c654a0b0719 100644 --- a/core/java/android/app/AppOpsManager.java +++ b/core/java/android/app/AppOpsManager.java @@ -2537,8 +2537,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