Merge "Ignore down touches in QS while animating" into tm-qpr-dev am: 73d4bdaf36

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20918578

Change-Id: I600d71a7f8fefaad2a341847639649493a3fefb2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Justin Weir
2023-01-12 12:57:29 +00:00
committed by Automerger Merge Worker

View File

@@ -2473,7 +2473,7 @@ public final class NotificationPanelViewController implements Dumpable {
mInitialTouchY = event.getY(); mInitialTouchY = event.getY();
mInitialTouchX = event.getX(); mInitialTouchX = event.getX();
} }
if (!isFullyCollapsed()) { if (!isFullyCollapsed() && !isShadeOrQsHeightAnimationRunning()) {
handleQsDown(event); handleQsDown(event);
} }
// defer touches on QQS to shade while shade is collapsing. Added margin for error // defer touches on QQS to shade while shade is collapsing. Added margin for error
@@ -5263,6 +5263,11 @@ public final class NotificationPanelViewController implements Dumpable {
} }
} }
/** Returns whether a shade or QS expansion animation is running */
private boolean isShadeOrQsHeightAnimationRunning() {
return mHeightAnimator != null && !mHintAnimationRunning && !mIsSpringBackAnimation;
}
/** /**
* Phase 2: Bounce down. * Phase 2: Bounce down.
*/ */
@@ -6280,8 +6285,7 @@ public final class NotificationPanelViewController implements Dumpable {
mCollapsedAndHeadsUpOnDown = mCollapsedAndHeadsUpOnDown =
isFullyCollapsed() && mHeadsUpManager.hasPinnedHeadsUp(); isFullyCollapsed() && mHeadsUpManager.hasPinnedHeadsUp();
addMovement(event); addMovement(event);
boolean regularHeightAnimationRunning = mHeightAnimator != null boolean regularHeightAnimationRunning = isShadeOrQsHeightAnimationRunning();
&& !mHintAnimationRunning && !mIsSpringBackAnimation;
if (!mGestureWaitForTouchSlop || regularHeightAnimationRunning) { if (!mGestureWaitForTouchSlop || regularHeightAnimationRunning) {
mTouchSlopExceeded = regularHeightAnimationRunning mTouchSlopExceeded = regularHeightAnimationRunning
|| mTouchSlopExceededBeforeDown; || mTouchSlopExceededBeforeDown;