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

Commit a16f0854 authored by Aaron Liu's avatar Aaron Liu Committed by Android (Google) Code Review
Browse files

Revert "Do not finish lockscreen for multiple sims."

This reverts commit 0f0a5bd6.

Reason for revert: automerge conflicts

Change-Id: I5b696f3cc7d364458630ba3510961caee6ef66d8
parent 0f0a5bd6
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -826,8 +826,7 @@ public class KeyguardSecurityContainerController extends ViewController<Keyguard
                    SecurityMode securityMode = mSecurityModel.getSecurityMode(targetUserId);
                    boolean isLockscreenDisabled = mLockPatternUtils.isLockScreenDisabled(
                            KeyguardUpdateMonitor.getCurrentUser());

                    if (securityMode == SecurityMode.None) {
                    if (securityMode == SecurityMode.None || isLockscreenDisabled) {
                        finish = isLockscreenDisabled;
                        eventSubtype = BOUNCER_DISMISS_SIM;
                        uiEvent = BouncerUiEvent.BOUNCER_DISMISS_SIM;
+0 −24
Original line number Diff line number Diff line
@@ -483,30 +483,6 @@ class KeyguardSecurityContainerControllerTest : SysuiTestCase() {
        verify(viewMediatorCallback, never()).keyguardDone(anyBoolean(), anyInt())
    }

    @Test
    fun showNextSecurityScreenOrFinish_SimPinToAnotherSimPin_None() {
        // GIVEN the current security method is SimPin
        whenever(keyguardUpdateMonitor.getUserHasTrust(anyInt())).thenReturn(false)
        whenever(keyguardUpdateMonitor.getUserUnlockedWithBiometric(TARGET_USER_ID))
            .thenReturn(false)
        underTest.showSecurityScreen(SecurityMode.SimPin)

        // WHEN a request is made from the SimPin screens to show the next security method
        whenever(keyguardSecurityModel.getSecurityMode(TARGET_USER_ID))
            .thenReturn(SecurityMode.SimPin)
        whenever(lockPatternUtils.isLockScreenDisabled(anyInt())).thenReturn(true)

        underTest.showNextSecurityScreenOrFinish(
            /* authenticated= */ true,
            TARGET_USER_ID,
            /* bypassSecondaryLockScreen= */ true,
            SecurityMode.SimPin
        )

        // THEN the next security method of None will dismiss keyguard.
        verify(viewMediatorCallback, never()).keyguardDone(anyBoolean(), anyInt())
    }

    @Test
    fun onSwipeUp_whenFaceDetectionIsNotRunning_initiatesFaceAuth() {
        val registeredSwipeListener = registeredSwipeListener