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

Commit 053b9e66 authored by Pavel Grafov's avatar Pavel Grafov Committed by Android (Google) Code Review
Browse files

Merge "Clean up fully rolled out AllowScreenBrightnessControlOnCope" into main

parents 7fda2cee d9ab0d29
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -245,13 +245,6 @@ flag {
  }
}

flag {
  name: "allow_screen_brightness_control_on_cope"
  namespace: "enterprise"
  description: "Allow COPE admin to control screen brightness and timeout."
  bug: "323894620"
}

flag {
  name: "always_persist_do"
  namespace: "enterprise"
+2 −2
Original line number Diff line number Diff line
@@ -15219,7 +15219,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
        final CallerIdentity caller = getCallerIdentity(who);
        Preconditions.checkCallAuthorization(
                isProfileOwner(caller) || isDefaultDeviceOwner(caller));
        if (Flags.allowScreenBrightnessControlOnCope() && parent) {
        if (parent) {
            Preconditions.checkCallAuthorization(isProfileOwnerOfOrganizationOwnedDevice(caller));
        }
        checkCanExecuteOrThrowUnsafe(DevicePolicyManager.OPERATION_SET_SYSTEM_SETTING);
@@ -15230,7 +15230,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
                        "Permission denial: device owners cannot update %1$s", setting));
            }
            int affectedUser;
            if (Flags.allowScreenBrightnessControlOnCope() && parent) {
            if (parent) {
                affectedUser = getProfileParentId(caller.getUserId());
            } else {
                affectedUser = caller.getUserId();