Loading packages/SystemUI/multivalentTests/src/com/android/keyguard/KeyguardSecurityContainerControllerTest.kt +16 −0 Original line number Diff line number Diff line Loading @@ -622,6 +622,22 @@ class KeyguardSecurityContainerControllerTest : SysuiTestCase() { verify(viewFlipperController).getSecurityView(eq(SecurityMode.SimPin), any(), any()) } @Test fun showNextSecurityScreenOrFinish_calledWithNoAuthentication_butRequiresSimPin() { // GIVEN trust is true (extended unlock) whenever(keyguardUpdateMonitor.getUserHasTrust(anyInt())).thenReturn(true) // WHEN SIMPIN is the next required screen whenever(keyguardSecurityModel.getSecurityMode(TARGET_USER_ID)) .thenReturn(SecurityMode.SimPin) // WHEN a request is made to dismiss underTest.dismiss(TARGET_USER_ID) // THEN we will show the SIM PIN screen verify(viewFlipperController).getSecurityView(eq(SecurityMode.SimPin), any(), any()) } @Test fun onSwipeUp_forwardsItToFaceAuthInteractor() { val registeredSwipeListener = registeredSwipeListener Loading packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainerController.java +12 −0 Original line number Diff line number Diff line Loading @@ -897,6 +897,18 @@ public class KeyguardSecurityContainerController extends ViewController<Keyguard break; } } // A check to dismiss was made without any authentication. Verify there are no remaining SIM // screens, which may happen on an unlocked lockscreen if (!authenticated) { SecurityMode securityMode = mSecurityModel.getSecurityMode(targetUserId); if (Arrays.asList(SimPin, SimPuk).contains(securityMode)) { Log.v(TAG, "Dismiss called but SIM/PUK unlock screen still required"); eventSubtype = -1; showSecurityScreen(securityMode); finish = false; } } // Check for device admin specified additional security measures. if (finish && !bypassSecondaryLockScreen) { Intent secondaryLockscreenIntent = Loading Loading
packages/SystemUI/multivalentTests/src/com/android/keyguard/KeyguardSecurityContainerControllerTest.kt +16 −0 Original line number Diff line number Diff line Loading @@ -622,6 +622,22 @@ class KeyguardSecurityContainerControllerTest : SysuiTestCase() { verify(viewFlipperController).getSecurityView(eq(SecurityMode.SimPin), any(), any()) } @Test fun showNextSecurityScreenOrFinish_calledWithNoAuthentication_butRequiresSimPin() { // GIVEN trust is true (extended unlock) whenever(keyguardUpdateMonitor.getUserHasTrust(anyInt())).thenReturn(true) // WHEN SIMPIN is the next required screen whenever(keyguardSecurityModel.getSecurityMode(TARGET_USER_ID)) .thenReturn(SecurityMode.SimPin) // WHEN a request is made to dismiss underTest.dismiss(TARGET_USER_ID) // THEN we will show the SIM PIN screen verify(viewFlipperController).getSecurityView(eq(SecurityMode.SimPin), any(), any()) } @Test fun onSwipeUp_forwardsItToFaceAuthInteractor() { val registeredSwipeListener = registeredSwipeListener Loading
packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainerController.java +12 −0 Original line number Diff line number Diff line Loading @@ -897,6 +897,18 @@ public class KeyguardSecurityContainerController extends ViewController<Keyguard break; } } // A check to dismiss was made without any authentication. Verify there are no remaining SIM // screens, which may happen on an unlocked lockscreen if (!authenticated) { SecurityMode securityMode = mSecurityModel.getSecurityMode(targetUserId); if (Arrays.asList(SimPin, SimPuk).contains(securityMode)) { Log.v(TAG, "Dismiss called but SIM/PUK unlock screen still required"); eventSubtype = -1; showSecurityScreen(securityMode); finish = false; } } // Check for device admin specified additional security measures. if (finish && !bypassSecondaryLockScreen) { Intent secondaryLockscreenIntent = Loading