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
This commit is contained in:
Evan Severson
2022-04-29 14:13:29 -07:00
parent 5589682f84
commit 807f4cfc80

View File

@@ -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