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

Commit f2c0a647 authored by Kevin Chyn's avatar Kevin Chyn
Browse files

Don't dismiss keyguard if guest has Pin/Pattern/PW set

Fixes: 38140390

Test: 1) create a guest, make sure if no pw is set keyguard dismisses
2) set a pw for the guest, make sure keyguard doesn't dismiss
3) lockout fingerprint by failing fp 5 times, then switch back to guest.
make sure error message is on bottom of screen.

Change-Id: Ic66fb3ac3e9bb62ac068f36208c73ffc14fe78d5
parent 23a44a88
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -364,7 +364,10 @@ public class KeyguardViewMediator extends SystemUI {
        public void onUserSwitchComplete(int userId) {
            if (userId != UserHandle.USER_SYSTEM) {
                UserInfo info = UserManager.get(mContext).getUserInfo(userId);
                if (info != null && (info.isGuest() || info.isDemo())) {
                // Don't try to dismiss if the user has Pin/Patter/Password set
                if (info == null || mLockPatternUtils.isSecure(userId)) {
                    return;
                } else if (info.isGuest() || info.isDemo()) {
                    // If we just switched to a guest, try to dismiss keyguard.
                    dismiss(null /* callback */);
                }