Bouncer - Remove cases that forced it to stay open

Until recently, when the user swiped up from the shade, the bouncer
would display. This required extra care when listening to panel
expansion events, to make sure the bouncer state was correct while
swiping. Now that the bouncer does not display in this manner, we can
safely remove a few checks regarding bouncer state that were
preventing it from hiding in some scenarios.

Fixes: 258588837
Test: atest StatusBarKeyguardViewManagerTest
Change-Id: I4fb6c38de3d309299b01d213ebdcf00b1549f1d9
This commit is contained in:
Matt Pietal
2022-11-10 19:35:40 +00:00
parent 2e38249906
commit 00bd9b3187
2 changed files with 10 additions and 10 deletions

View File

@@ -469,7 +469,7 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
// Don't expand to the bouncer. Instead transition back to the lock screen (see
// CentralSurfaces#showBouncerOrLockScreenIfKeyguard)
return;
} else if (primaryBouncerNeedsScrimming()) {
} else if (needsFullscreenBouncer()) {
if (mPrimaryBouncer != null) {
mPrimaryBouncer.setExpansion(KeyguardBouncer.EXPANSION_VISIBLE);
} else {

View File

@@ -222,9 +222,16 @@ public class StatusBarKeyguardViewManagerTest extends SysuiTestCase {
}
@Test
public void onPanelExpansionChanged_neverHidesScrimmedBouncer() {
public void onPanelExpansionChanged_neverHidesFullscreenBouncer() {
when(mPrimaryBouncer.isShowing()).thenReturn(true);
when(mPrimaryBouncer.isScrimmed()).thenReturn(true);
when(mKeyguardSecurityModel.getSecurityMode(anyInt())).thenReturn(
KeyguardSecurityModel.SecurityMode.SimPuk);
mStatusBarKeyguardViewManager.onPanelExpansionChanged(EXPANSION_EVENT);
verify(mPrimaryBouncer).setExpansion(eq(KeyguardBouncer.EXPANSION_VISIBLE));
reset(mPrimaryBouncer);
when(mKeyguardSecurityModel.getSecurityMode(anyInt())).thenReturn(
KeyguardSecurityModel.SecurityMode.SimPin);
mStatusBarKeyguardViewManager.onPanelExpansionChanged(EXPANSION_EVENT);
verify(mPrimaryBouncer).setExpansion(eq(KeyguardBouncer.EXPANSION_VISIBLE));
}
@@ -270,13 +277,6 @@ public class StatusBarKeyguardViewManagerTest extends SysuiTestCase {
verify(mPrimaryBouncer, never()).show(eq(false), eq(false));
}
@Test
public void onPanelExpansionChanged_neverTranslatesBouncerWhenOccluded() {
mStatusBarKeyguardViewManager.setOccluded(true /* occluded */, false /* animate */);
mStatusBarKeyguardViewManager.onPanelExpansionChanged(EXPANSION_EVENT);
verify(mPrimaryBouncer, never()).setExpansion(eq(0.5f));
}
@Test
public void onPanelExpansionChanged_neverTranslatesBouncerWhenWakeAndUnlock() {
when(mBiometricUnlockController.getMode())