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
This commit is contained in:
Evan Severson
2022-04-29 14:13:29 -07:00
parent 6298c68c71
commit 530407c903

View File

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