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

Commit 680e3579 authored by Ivan Podogov's avatar Ivan Podogov
Browse files

Don't dismiss keyguard when enabling it

Introduced in ag/2664156, dismissing a keyguard when it's being disabled has
also caused it to be shown whenever it's being enabled (or re-enabled, or
calling DPM.setKeyguardDisabled when keyguard is enabled).

This change should stop keyguard randomly popping up.

Bug: 133730775
Test: manual
Change-Id: I49f28714b2d149f13168e7564947aaf09c593117
parent 544e00d3
Loading
Loading
Loading
Loading
+5 −1
Original line number Original line Diff line number Diff line
@@ -11018,7 +11018,11 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager {
                return false;
                return false;
            }
            }
            mLockPatternUtils.setLockScreenDisabled(disabled, userId);
            mLockPatternUtils.setLockScreenDisabled(disabled, userId);
            mInjector.getIWindowManager().dismissKeyguard(null /* callback */, null /* message */);
            if (disabled) {
                mInjector
                        .getIWindowManager()
                        .dismissKeyguard(null /* callback */, null /* message */);
            }
            DevicePolicyEventLogger
            DevicePolicyEventLogger
                    .createEvent(DevicePolicyEnums.SET_KEYGUARD_DISABLED)
                    .createEvent(DevicePolicyEnums.SET_KEYGUARD_DISABLED)
                    .setAdmin(who)
                    .setAdmin(who)