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

Commit b4299d92 authored by Jordan Liu's avatar Jordan Liu
Browse files

Dismiss SIM lock page after correct SIM

Previously the criteria was to dismiss if:
1. There is no pin/password/pattern set AND
2. the lockscreen is disabled.

This behaved incorrectly in the case where the lockscreen is enabled
but there is no pin/password/pattern set.

We fix the condition so that now we dismiss the SIM lock if:
1. There is no pin/password/pattern set OR
2. the lockscreen is disabled.

Fixes: 115780994
Test: manual
Change-Id: I88da896add635126934eb0ed22e617ac2607f15a
parent 7fe46504
Loading
Loading
Loading
Loading
+3 −4
Original line number Original line Diff line number Diff line
@@ -342,12 +342,11 @@ public class KeyguardSecurityContainer extends FrameLayout implements KeyguardSe
                case SimPuk:
                case SimPuk:
                    // Shortcut for SIM PIN/PUK to go to directly to user's security screen or home
                    // Shortcut for SIM PIN/PUK to go to directly to user's security screen or home
                    SecurityMode securityMode = mSecurityModel.getSecurityMode(targetUserId);
                    SecurityMode securityMode = mSecurityModel.getSecurityMode(targetUserId);
                    if (securityMode != SecurityMode.None
                    if (securityMode == SecurityMode.None || mLockPatternUtils.isLockScreenDisabled(
                            || !mLockPatternUtils.isLockScreenDisabled(
                            KeyguardUpdateMonitor.getCurrentUser())) {
                            KeyguardUpdateMonitor.getCurrentUser())) {
                        showSecurityScreen(securityMode);
                    } else {
                        finish = true;
                        finish = true;
                    } else {
                        showSecurityScreen(securityMode);
                    }
                    }
                    break;
                    break;