summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Shawn Lee <syeonlee@google.com> 2022-11-28 18:28:16 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2022-11-28 18:28:16 +0000
commit40d9120459f067eb9d311b33be3762d94e450b48 (patch)
treec41485bf9bcc0b287801ce1404f15e7cc1b09169
parent439610828223815cf22771edb5efac5975f35842 (diff)
parent4dfa86ae186f2dd2404b657f0c8fcb9c2ca613a8 (diff)
Merge "Fixed animation breakage when QS area tapped during expand/collapse" into tm-qpr-dev am: 4dfa86ae18
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20535896 Change-Id: I9422ba374cae6753d1ad0ace20045b2f29d64118 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java15
1 files changed, 14 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java b/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java
index e68182ef85c9..629d3d4d50ba 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java
+++ b/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java
@@ -2072,6 +2072,13 @@ public final class NotificationPanelViewController implements Dumpable {
mInitialTouchX = x;
initVelocityTracker();
trackMovement(event);
+ float qsExpansionFraction = computeQsExpansionFraction();
+ // Intercept the touch if QS is between fully collapsed and fully expanded state
+ if (qsExpansionFraction > 0.0 && qsExpansionFraction < 1.0) {
+ mShadeLog.logMotionEvent(event,
+ "onQsIntercept: down action, QS partially expanded/collapsed");
+ return true;
+ }
if (mKeyguardShowing
&& shouldQuickSettingsIntercept(mInitialTouchX, mInitialTouchY, 0)) {
// Dragging down on the lockscreen statusbar should prohibit other interactions
@@ -2324,6 +2331,13 @@ public final class NotificationPanelViewController implements Dumpable {
if (!isFullyCollapsed()) {
handleQsDown(event);
}
+ // defer touches on QQS to shade while shade is collapsing. Added margin for error
+ // as sometimes the qsExpansionFraction can be a tiny value instead of 0 when in QQS.
+ if (computeQsExpansionFraction() <= 0.01 && getExpandedFraction() < 1.0) {
+ mShadeLog.logMotionEvent(event,
+ "handleQsTouch: QQS touched while shade collapsing");
+ mQsTracking = false;
+ }
if (!mQsExpandImmediate && mQsTracking) {
onQsTouch(event);
if (!mConflictingQsExpansionGesture && !mSplitShadeEnabled) {
@@ -2564,7 +2578,6 @@ public final class NotificationPanelViewController implements Dumpable {
// Reset scroll position and apply that position to the expanded height.
float height = mQsExpansionHeight;
setQsExpansionHeight(height);
- updateExpandedHeightToMaxHeight();
mNotificationStackScrollLayoutController.checkSnoozeLeavebehind();
// When expanding QS, let's authenticate the user if possible,