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

Commit a1764c81 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix setSecondaryLockscreenEnabled flag behavior." into main

parents 14d102c6 0a3d244d
Loading
Loading
Loading
Loading
+3 −11
Original line number Diff line number Diff line
@@ -14673,7 +14673,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
    @Override
    public void setSecondaryLockscreenEnabled(ComponentName who, boolean enabled,
            PersistableBundle options) {
        if (Flags.secondaryLockscreenApiEnabled()) {
        if (Flags.secondaryLockscreenApiEnabled() && mSupervisionManagerInternal != null) {
            final CallerIdentity caller = getCallerIdentity();
            final boolean isRoleHolder = isCallerSystemSupervisionRoleHolder(caller);
            synchronized (getLockObject()) {
@@ -14684,16 +14684,8 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
                        caller.getUserId());
            }
            if (mSupervisionManagerInternal != null) {
            mSupervisionManagerInternal.setSupervisionLockscreenEnabledForUser(
                    caller.getUserId(), enabled, options);
            } else {
                synchronized (getLockObject()) {
                    DevicePolicyData policy = getUserData(caller.getUserId());
                    policy.mSecondaryLockscreenEnabled = enabled;
                    saveSettingsLocked(caller.getUserId());
                }
            }
        } else {
            Objects.requireNonNull(who, "ComponentName is null");