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

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

Merge "Remove falsing collection for simpin screen." into main

parents 1290bd66 d2706717
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -635,8 +635,12 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
    protected void showBouncerOrKeyguard(boolean hideBouncerWhenShowing) {
        if (needsFullscreenBouncer() && !mDozing) {
            // The keyguard might be showing (already). So we need to hide it.
            if (!primaryBouncerIsShowing()) {
                mCentralSurfaces.hideKeyguard();
                mPrimaryBouncerInteractor.show(true);
            } else {
                Log.e(TAG, "Attempted to show the sim bouncer when it is already showing.");
            }
        } else {
            mCentralSurfaces.showKeyguard();
            if (hideBouncerWhenShowing) {
+19 −0
Original line number Diff line number Diff line
@@ -976,4 +976,23 @@ public class StatusBarKeyguardViewManagerTest extends SysuiTestCase {
        verify(mKeyguardMessageAreaController).setIsVisible(eq(false));
        verify(mKeyguardMessageAreaController).setMessage(eq(""));
    }

    @Test
    public void testShowBouncerOrKeyguard_needsFullScreen() {
        when(mKeyguardSecurityModel.getSecurityMode(anyInt())).thenReturn(
                KeyguardSecurityModel.SecurityMode.SimPin);
        mStatusBarKeyguardViewManager.showBouncerOrKeyguard(false);
        verify(mCentralSurfaces).hideKeyguard();
        verify(mPrimaryBouncerInteractor).show(true);
    }

    @Test
    public void testShowBouncerOrKeyguard_needsFullScreen_bouncerAlreadyShowing() {
        when(mKeyguardSecurityModel.getSecurityMode(anyInt())).thenReturn(
                KeyguardSecurityModel.SecurityMode.SimPin);
        when(mPrimaryBouncerInteractor.isFullyShowing()).thenReturn(true);
        mStatusBarKeyguardViewManager.showBouncerOrKeyguard(false);
        verify(mCentralSurfaces, never()).hideKeyguard();
        verify(mPrimaryBouncerInteractor, never()).show(true);
    }
}