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

Commit cc110e6a authored by Selim Cinek's avatar Selim Cinek Committed by Android (Google) Code Review
Browse files

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

parents 5e11d0b9 703c9e5c
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();