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

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

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

parents 2775a1d8 f2c0a647
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 */);
                }