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

Commit 41e1c468 authored by Lucas Dupin's avatar Lucas Dupin Committed by Android (Google) Code Review
Browse files

Merge "Fix scrims not fading in" into tm-dev

parents c37d317e c43e240f
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);