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

Commit 75dda48a authored by Selim Cinek's avatar Selim Cinek Committed by Automerger Merge Worker
Browse files

Merge "Fixed an issue where using UDFPS always dismissed the shade" into...

Merge "Fixed an issue where using UDFPS always dismissed the shade" into sc-v2-dev am: cc110e6a am: f1eecaf3

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16140634

Change-Id: I9f3ff349206c01be543d79484a8565284d1a83cc
parents c912d079 f1eecaf3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -907,7 +907,7 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb

    @Override
    public boolean bouncerIsOrWillBeShowing() {
        return mBouncer.isShowing() || mBouncer.getShowingSoon();
        return isBouncerShowing() || mBouncer.getShowingSoon();
    }

    public boolean isFullscreenBouncer() {
+21 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package com.android.systemui.statusbar.phone;

import static org.junit.Assert.assertTrue;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyBoolean;
import static org.mockito.ArgumentMatchers.anyFloat;
@@ -97,6 +98,8 @@ public class StatusBarKeyguardViewManagerTest extends SysuiTestCase {
    @Mock
    private UnlockedScreenOffAnimationController mUnlockedScreenOffAnimationController;
    @Mock
    private StatusBarKeyguardViewManager.AlternateAuthInterceptor mAlternateAuthInterceptor;
    @Mock
    private KeyguardMessageArea mKeyguardMessageArea;
    @Mock
    private Lazy<ShadeController> mShadeController;
@@ -286,6 +289,24 @@ public class StatusBarKeyguardViewManagerTest extends SysuiTestCase {
        verify(cancelAction, never()).run();
    }

    @Test
    public void testShowing_whenAlternateAuthShowing() {
        mStatusBarKeyguardViewManager.setAlternateAuthInterceptor(mAlternateAuthInterceptor);
        when(mBouncer.isShowing()).thenReturn(false);
        when(mAlternateAuthInterceptor.isShowingAlternateAuthBouncer()).thenReturn(true);
        assertTrue("Is showing not accurate when alternative auth showing",
                mStatusBarKeyguardViewManager.isShowing());
    }

    @Test
    public void testWillBeShowing_whenAlternateAuthShowing() {
        mStatusBarKeyguardViewManager.setAlternateAuthInterceptor(mAlternateAuthInterceptor);
        when(mBouncer.isShowing()).thenReturn(false);
        when(mAlternateAuthInterceptor.isShowingAlternateAuthBouncer()).thenReturn(true);
        assertTrue("Is or will be showing not accurate when alternative auth showing",
                mStatusBarKeyguardViewManager.bouncerIsOrWillBeShowing());
    }

    @Test
    public void testUpdateResources_delegatesToBouncer() {
        mStatusBarKeyguardViewManager.updateResources();