Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d7aed4b1 authored by Jonathan Scott's avatar Jonathan Scott
Browse files

Fix global user restriction permission check.

Test: a.d.c.BluetoothTest
Bug: 274710659
Change-Id: I3983803717a58f24fdaed79557b7bc51fba65ff6
parent 37cf1851
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -13295,7 +13295,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
                /* who= */ null,
                key,
                caller.getPackageName(),
                caller.getUserId()
                UserHandle.USER_ALL
        );
        setGlobalUserRestrictionInternal(admin, key, /* enabled= */ true);
@@ -22550,7 +22550,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
    );
    /**
     * All the permisisons granted to a profile owner.
     * All the permissions granted to a profile owner.
     */
    private static final List<String> PROFILE_OWNER_PERMISSIONS  =
            List.of(
@@ -22560,6 +22560,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
                    MANAGE_DEVICE_POLICY_APP_RESTRICTIONS,
                    MANAGE_DEVICE_POLICY_AUDIO_OUTPUT,
                    MANAGE_DEVICE_POLICY_AUTOFILL,
                    MANAGE_DEVICE_POLICY_BLUETOOTH,
                    MANAGE_DEVICE_POLICY_CALLS,
                    MANAGE_DEVICE_POLICY_DEBUGGING_FEATURES,
                    MANAGE_DEVICE_POLICY_DISPLAY,
@@ -22596,7 +22597,6 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
                    MANAGE_DEVICE_POLICY_ACROSS_USERS,
                    MANAGE_DEVICE_POLICY_AIRPLANE_MODE,
                    MANAGE_DEVICE_POLICY_APPS_CONTROL,
                    MANAGE_DEVICE_POLICY_BLUETOOTH,
                    MANAGE_DEVICE_POLICY_CAMERA,
                    MANAGE_DEVICE_POLICY_CERTIFICATES,
                    MANAGE_DEVICE_POLICY_COMMON_CRITERIA_MODE,
@@ -22623,7 +22623,6 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
    private static final List<String> ADDITIONAL_PROFILE_OWNER_ON_USER_0_PERMISSIONS =
            List.of(
                    MANAGE_DEVICE_POLICY_AIRPLANE_MODE,
                    MANAGE_DEVICE_POLICY_BLUETOOTH,
                    MANAGE_DEVICE_POLICY_CAMERA,
                    MANAGE_DEVICE_POLICY_DISPLAY,
                    MANAGE_DEVICE_POLICY_FUN,