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:
@@ -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);
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user