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

Commit ca5f11e7 authored by Automerger Merge Worker's avatar Automerger Merge Worker Committed by Android (Google) Code Review
Browse files

Merge "Merge "Fix scrims not fading in" into tm-dev am: 41e1c468 am:...

Merge "Merge "Fix scrims not fading in" into tm-dev am: 41e1c468 am: 8eeb3930" into tm-d1-dev-plus-aosp
parents 4cac1d67 eb08e398
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -390,6 +390,11 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
                    && !mBouncer.isShowing() && !mBouncer.isAnimatingAway()) {
                mBouncer.show(false /* resetSecuritySelection */, false /* scrimmed */);
            }
        } else if (!mShowing && mBouncer.inTransit()) {
            // Keyguard is not visible anymore, but expansion animation was still running.
            // We need to keep propagating the expansion state to the bouncer, otherwise it will be
            // stuck in transit.
            mBouncer.setExpansion(fraction);
        } else if (mPulsing && fraction == KeyguardBouncer.EXPANSION_VISIBLE) {
            // Panel expanded while pulsing but didn't translate the bouncer (because we are
            // unlocked.) Let's simply wake-up to dismiss the lock screen.
+9 −0
Original line number Diff line number Diff line
@@ -191,6 +191,15 @@ public class StatusBarKeyguardViewManagerTest extends SysuiTestCase {
        verify(mBouncer).setExpansion(eq(0.5f));
    }

    @Test
    public void onPanelExpansionChanged_propagatesToBouncer_evenAfterHidden() {
        mStatusBarKeyguardViewManager.hide(0, 0);
        when(mBouncer.inTransit()).thenReturn(true);

        mStatusBarKeyguardViewManager.onPanelExpansionChanged(EXPANSION_EVENT);
        verify(mBouncer).setExpansion(eq(EXPANSION_EVENT.getFraction()));
    }

    @Test
    public void onPanelExpansionChanged_showsBouncerWhenSwiping() {
        when(mKeyguardStateController.canDismissLockScreen()).thenReturn(false);