Revert "Do not allow panel expansion with bouncer over dream."

This reverts commit 5cb83b89dd.

Reason for revert: Causes issues with transition animations

Test: manual
Change-Id: I82c6d3a6f78622fad37352d0f01ab1fbc8023185
This commit is contained in:
Bryce Lee
2022-04-11 19:14:12 +00:00
parent b1dc271774
commit 1f6fb398d7
4 changed files with 5 additions and 34 deletions

View File

@@ -144,9 +144,6 @@ public class BouncerSwipeTouchHandler implements DreamTouchHandler {
private void setPanelExpansion(float expansion) {
mCurrentExpansion = expansion;
mCentralSurfaces.setBouncerShowing(expansion != KeyguardBouncer.EXPANSION_HIDDEN);
mStatusBarKeyguardViewManager.onPanelExpansionChanged(mCurrentExpansion, false, true);
}

View File

@@ -3467,7 +3467,9 @@ public class CentralSurfaces extends CoreStartable implements
mStatusBarHideIconsForBouncerManager.setBouncerShowingAndTriggerUpdate(bouncerShowing);
mCommandQueue.recomputeDisableFlags(mDisplayId, true /* animate */);
updateScrimController();
updateNotificationPanelTouchState();
if (!mBouncerShowing) {
updatePanelExpansionForKeyguard();
}
}
/**
@@ -3612,13 +3614,10 @@ public class CentralSurfaces extends CoreStartable implements
* collapse the panel after we expanded it, and thus we would end up with a blank
* Keyguard.
*/
public void updateNotificationPanelTouchState() {
void updateNotificationPanelTouchState() {
boolean goingToSleepWithoutAnimation = isGoingToSleep()
&& !mDozeParameters.shouldControlScreenOff();
boolean bouncerShowingOverDream = isBouncerShowing()
&& mDreamOverlayStateController.isOverlayActive();
boolean disabled = bouncerShowingOverDream
|| (!mDeviceInteractive && !mDozeServiceHost.isPulsing())
boolean disabled = (!mDeviceInteractive && !mDozeServiceHost.isPulsing())
|| goingToSleepWithoutAnimation;
mNotificationPanelViewController.setTouchAndAnimationDisabled(disabled);
mNotificationIconAreaController.setAnimationsEnabled(!disabled);

View File

@@ -418,8 +418,6 @@ public abstract class PanelViewController {
expand = false;
} else if (onKeyguard) {
expand = true;
} else if (mCentralSurfaces.isBouncerShowingOverDream()) {
expand = false;
} else if (mKeyguardStateController.isKeyguardFadingAway()) {
// If we're in the middle of dismissing the keyguard, don't expand due to the
// cancelled gesture. Gesture cancellation during an unlock is expected in some

View File

@@ -160,28 +160,6 @@ public class BouncerSwipeTouchHandlerTest extends SysuiTestCase {
2)).isTrue();
}
/**
* Ensures {@link CentralSurfaces}
*/
@Test
public void testInformBouncerShowingOnExpand() {
swipeToPosition(1f, Direction.UP, 0);
verify(mCentralSurfaces).setBouncerShowing(true);
}
/**
* Ensures {@link CentralSurfaces}
*/
@Test
public void testInformBouncerHidingOnCollapse() {
// Must swipe up to set initial state.
swipeToPosition(1f, Direction.UP, 0);
Mockito.clearInvocations(mCentralSurfaces);
swipeToPosition(0f, Direction.DOWN, 0);
verify(mCentralSurfaces).setBouncerShowing(false);
}
private enum Direction {
DOWN,
UP,
@@ -443,7 +421,6 @@ public class BouncerSwipeTouchHandlerTest extends SysuiTestCase {
}
private void swipeToPosition(float percent, Direction direction, float velocityY) {
Mockito.clearInvocations(mTouchSession);
mTouchHandler.onSessionStart(mTouchSession);
ArgumentCaptor<GestureDetector.OnGestureListener> gestureListenerCaptor =
ArgumentCaptor.forClass(GestureDetector.OnGestureListener.class);