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

Commit 92a0b68c authored by Priyanka Advani (xWF)'s avatar Priyanka Advani (xWF)
Browse files

Revert "Clean up fully rolled out AllowScreenBrightnessControlOnCope"

Revert submission 28993807-hdop-cleaup

Reason for revert: Droidmonitor created revert due to b/363275535. Will be verifying through ABTD before submission.

Reverted changes: /q/submissionid:28993807-hdop-cleaup

Change-Id: I3bce5a1416c550ad5c65a80ed7c5b5cf1b2b7c1b
parent 28a51db7
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -220,6 +220,13 @@ 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
@@ -15162,7 +15162,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
        final CallerIdentity caller = getCallerIdentity(who);
        Preconditions.checkCallAuthorization(
                isProfileOwner(caller) || isDefaultDeviceOwner(caller));
        if (parent) {
        if (Flags.allowScreenBrightnessControlOnCope() && parent) {
            Preconditions.checkCallAuthorization(isProfileOwnerOfOrganizationOwnedDevice(caller));
        }
        checkCanExecuteOrThrowUnsafe(DevicePolicyManager.OPERATION_SET_SYSTEM_SETTING);
@@ -15173,7 +15173,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
                        "Permission denial: device owners cannot update %1$s", setting));
            }
            int affectedUser;
            if (parent) {
            if (Flags.allowScreenBrightnessControlOnCope() && parent) {
                affectedUser = getProfileParentId(caller.getUserId());
            } else {
                affectedUser = caller.getUserId();