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

Commit 65b4683e authored by Jonathan Scott's avatar Jonathan Scott
Browse files

Fix issue with DPMRH when on not-user-zero.

Test: btest a.d.c.SystemErrorDialogsTest
Bug: 274890916
Change-Id: Ifc20b066a32613c008c55e9547289699a1b5295a
parent 68fe9b54
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -22293,7 +22293,8 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
            MANAGE_DEVICE_POLICY_PACKAGE_STATE,
            MANAGE_DEVICE_POLICY_RESET_PASSWORD,
            MANAGE_DEVICE_POLICY_STATUS_BAR,
            MANAGE_DEVICE_POLICY_APP_RESTRICTIONS);
            MANAGE_DEVICE_POLICY_APP_RESTRICTIONS,
            MANAGE_DEVICE_POLICY_SYSTEM_DIALOGS);
    private static final List<String> PROFILE_OWNER_PERMISSIONS  = List.of(
            MANAGE_DEVICE_POLICY_ACROSS_USERS_SECURITY_CRITICAL,
            MANAGE_DEVICE_POLICY_ORGANIZATION_IDENTITY,
@@ -22627,7 +22628,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
        }
        // Check the permission for the role-holder
        if (isCallerDevicePolicyManagementRoleHolder(caller)) {
            return anyDpcHasPermission(permission, mContext.getUserId());
            return anyDpcHasPermission(permission, caller.getUserId());
        }
        if (DELEGATE_SCOPES.containsKey(permission)) {
            return isCallerDelegate(caller, DELEGATE_SCOPES.get(permission));