Fix scrims not fading in
If the keyguard dismissal animation finishes before the last panel expansion event, the expansion would never be propagated to the bouncer, causing it to be stuck in transit forever. Test: manual with udfps Test: atest StatusBarKeyguardViewManagerTest Fixes: 228048755 Fixes: 230195693 Bug: 228361057 Change-Id: I8167b8ab534f2c7e5676d9f2a9f0199f8b952f83
This commit is contained in:
committed by
Christian Göllner
parent
57edb1f789
commit
c43e240f6a
@@ -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.
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user