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

Commit 7c08f07e authored by Rafael Prado's avatar Rafael Prado Committed by Android (Google) Code Review
Browse files

Merge "Associate DISALLOW_GRANT_ADMIN with MANAGE_DEVICE_POLICY_MODIFY_USERS permission." into main

parents f46f8e48 e66a26e8
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -432,3 +432,13 @@ flag {
    purpose: PURPOSE_BUGFIX
  }
}

flag {
  name: "associate_disallow_grant_admin_with_permission"
  namespace: "supervision"
  description: "DISALLOW_GRANT_ADMIN restriction is currently not associated with any permission, causing null pointer exceptions when client try to add it."
  bug: "407776766"
  metadata {
    purpose: PURPOSE_BUGFIX
  }
}
+4 −0
Original line number Diff line number Diff line
@@ -13799,6 +13799,10 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
                UserManager.DISALLOW_FACTORY_RESET, new String[]{MANAGE_DEVICE_POLICY_FACTORY_RESET});
        USER_RESTRICTION_PERMISSIONS.put(
                UserManager.DISALLOW_FUN, new String[]{MANAGE_DEVICE_POLICY_FUN});
        if (Flags.associateDisallowGrantAdminWithPermission()) {
            USER_RESTRICTION_PERMISSIONS.put(
                UserManager.DISALLOW_GRANT_ADMIN, new String[]{MANAGE_DEVICE_POLICY_MODIFY_USERS});
        }
        USER_RESTRICTION_PERMISSIONS.put(
                UserManager.DISALLOW_INSTALL_APPS, new String[]{MANAGE_DEVICE_POLICY_APPS_CONTROL});
        USER_RESTRICTION_PERMISSIONS.put(