Fix shade over occluded activity

A recent change was showing the bouncer when swiping down to view the
shade over an occluding activity like camera. Make sure the bouncer is
not directed to display when receiving these panel expansion events.

Fixes: 260199818
Test: atest StatusBarKeyguardViewManagerTest
Test: manual - use occluding activities and test shade and bouncer swipes
Change-Id: Iab69c6f33e20ba337bf659ad7ad9eea774988ae5
This commit is contained in:
Matt Pietal
2022-11-23 19:45:44 +00:00
parent afcfb91de9
commit 5a3da80f10
2 changed files with 14 additions and 0 deletions

View File

@@ -469,6 +469,9 @@ 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 (mKeyguardStateController.isOccluded()
&& !mDreamOverlayStateController.isOverlayActive()) {
return;
} else if (needsFullscreenBouncer()) {
if (mPrimaryBouncer != null) {
mPrimaryBouncer.setExpansion(KeyguardBouncer.EXPANSION_VISIBLE);

View File

@@ -306,6 +306,17 @@ public class StatusBarKeyguardViewManagerTest extends SysuiTestCase {
verify(mPrimaryBouncer, never()).setExpansion(anyFloat());
}
@Test
public void onPanelExpansionChanged_neverTranslatesBouncerWhenOccluded() {
when(mKeyguardStateController.isOccluded()).thenReturn(true);
mStatusBarKeyguardViewManager.onPanelExpansionChanged(
expansionEvent(
/* fraction= */ KeyguardBouncer.EXPANSION_VISIBLE,
/* expanded= */ true,
/* tracking= */ false));
verify(mPrimaryBouncer, never()).setExpansion(anyFloat());
}
@Test
public void onPanelExpansionChanged_neverTranslatesBouncerWhenShowBouncer() {
// Since KeyguardBouncer.EXPANSION_VISIBLE = 0 panel expansion, if the unlock is dismissing