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

Commit d1575cbd authored by Aaron Liu's avatar Aaron Liu
Browse files

Ensure that resetStateLocked is called

when NOT_READY. When we disable the esim, the state will be NOT_READY
(6). We need to ensure that we move away from the sim screen when we
disable the esim.

There is a comment here that says that we do not want to show lockscreen
when SIM is NOT_READY; however looking at the CL, there was a different
ensuing code path that will invoke #doKeyguardLocked. #resetStateLocked
should be fine though.

Fixes: 317762890
Test: disable esim
Flag: NONE
Change-Id: I7f8a0f11be8f3343cd8d0dcc01559642a9dd6509
parent c491b9d2
Loading
Loading
Loading
Loading
+9 −8
Original line number Diff line number Diff line
@@ -689,17 +689,18 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable,
                            } else {
                                resetStateLocked();
                            }
                        } else {
                            if (lastSimStateWasLocked && mShowing) {
                                if (DEBUG_SIM_STATES) {
                                    Log.d(TAG, "SIM moved to "
                                            + "NOT_READY/ABSENT/UNKNOWN when the previous state "
                                            + "was locked. Reset the state.");
                                }
                        if (simState == TelephonyManager.SIM_STATE_ABSENT) {
                            // MVNO SIMs can become transiently NOT_READY when switching networks,
                            // so we should only lock when they are ABSENT.
                            if (lastSimStateWasLocked) {
                                if (DEBUG_SIM_STATES) Log.d(TAG, "SIM moved to ABSENT when the "
                                        + "previous state was locked. Reset the state.");
                                resetStateLocked();
                            }
                            mSimWasLocked.append(slotId, false);
                        }

                        mSimWasLocked.append(slotId, false);
                    }
                    break;
                case TelephonyManager.SIM_STATE_PIN_REQUIRED: