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

Commit b23c2d5f authored by Beverly's avatar Beverly Committed by Beverly Tai
Browse files

On device lockdown, always show the keyguard

Manual test steps:
1. Enable app pinning and disable "Ask for PIN before unpinning" setting
2. Pin an app (ie: Settings)
3. Lockdown from the power menu
Observe: user is brought to the keyguard, primary auth is required
to enter the device. After entering credential, the device is still in
app pinning mode.

Test: atest KeyguardViewMediatorTest
Test: manual steps outlined above
Bug: 218495634
Change-Id: I9a7c5e1acadabd4484e58573331f98dba895f2a2
Merged-In: I9a7c5e1acadabd4484e58573331f98dba895f2a2
parent 42635aa4
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -575,6 +575,13 @@ public class KeyguardViewMediator extends SystemUI implements Dumpable {
                notifyHasLockscreenWallpaperChanged(hasLockscreenWallpaper);
            }
        }

        @Override
        public void onStrongAuthStateChanged(int userId) {
            if (mLockPatternUtils.isUserInLockdown(KeyguardUpdateMonitor.getCurrentUser())) {
                doKeyguardLocked(null);
            }
        }
    };

    ViewMediatorCallback mViewMediatorCallback = new ViewMediatorCallback() {
@@ -1360,7 +1367,8 @@ public class KeyguardViewMediator extends SystemUI implements Dumpable {
        }

        // if another app is disabling us, don't show
        if (!mExternallyEnabled) {
        if (!mExternallyEnabled
            && !mLockPatternUtils.isUserInLockdown(KeyguardUpdateMonitor.getCurrentUser())) {
            if (DEBUG) Log.d(TAG, "doKeyguard: not showing because externally disabled");

            mNeedToReshowWhenReenabled = true;