Merge "Fix scrims not fading in" into tm-dev
This commit is contained in:
@@ -390,6 +390,11 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
|
|||||||
&& !mBouncer.isShowing() && !mBouncer.isAnimatingAway()) {
|
&& !mBouncer.isShowing() && !mBouncer.isAnimatingAway()) {
|
||||||
mBouncer.show(false /* resetSecuritySelection */, false /* scrimmed */);
|
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) {
|
} else if (mPulsing && fraction == KeyguardBouncer.EXPANSION_VISIBLE) {
|
||||||
// Panel expanded while pulsing but didn't translate the bouncer (because we are
|
// Panel expanded while pulsing but didn't translate the bouncer (because we are
|
||||||
// unlocked.) Let's simply wake-up to dismiss the lock screen.
|
// unlocked.) Let's simply wake-up to dismiss the lock screen.
|
||||||
|
|||||||
@@ -191,6 +191,15 @@ public class StatusBarKeyguardViewManagerTest extends SysuiTestCase {
|
|||||||
verify(mBouncer).setExpansion(eq(0.5f));
|
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
|
@Test
|
||||||
public void onPanelExpansionChanged_showsBouncerWhenSwiping() {
|
public void onPanelExpansionChanged_showsBouncerWhenSwiping() {
|
||||||
when(mKeyguardStateController.canDismissLockScreen()).thenReturn(false);
|
when(mKeyguardStateController.canDismissLockScreen()).thenReturn(false);
|
||||||
|
|||||||
Reference in New Issue
Block a user