diff options
| author | 2023-01-27 23:08:59 -0800 | |
|---|---|---|
| committer | 2023-01-27 23:21:59 -0800 | |
| commit | 38da44eec0ffdd2de24304a87d43fecd0b3ac0ae (patch) | |
| tree | e053fea28dbffe74fe1ddce108329b1a8e9bb5d8 | |
| parent | 4c71a7841c82d61c7ea18dae58028b7a81df05b3 (diff) | |
Fixed consistent flicker on shade open after multitouch
Bug was triggered by skipped ACTION_DOWN after multitouch breaking
the shade. The flicker was caused by mTracking not being properly set,
and the mInitialExpandY not being reset from the previous gesture
caused the shade to require a much longer swipe to begin expanding.
Bug: 264665511
Test: manual
Change-Id: I9a1a93d9661d6c3cd69356883e12a04010641d3b
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java b/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java index b6f08f83e43c..469f3833ba92 100644 --- a/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java +++ b/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java @@ -4958,8 +4958,12 @@ public final class NotificationPanelViewController implements Dumpable { beginJankMonitoring(); } mInitialOffsetOnTouch = expandedHeight; - mInitialExpandY = newY; - mInitialExpandX = newX; + if (!mTracking || isFullyCollapsed()) { + mInitialExpandY = newY; + mInitialExpandX = newX; + } else { + mShadeLog.d("not setting mInitialExpandY in startExpandMotion"); + } mInitialTouchFromKeyguard = mKeyguardStateController.isShowing(); if (startTracking) { mTouchSlopExceeded = true; @@ -6143,8 +6147,12 @@ public final class NotificationPanelViewController implements Dumpable { + " false"); return true; } - mInitialExpandY = y; - mInitialExpandX = x; + if (!mTracking || isFullyCollapsed()) { + mInitialExpandY = y; + mInitialExpandX = x; + } else { + mShadeLog.d("not setting mInitialExpandY in onInterceptTouch"); + } mTouchStartedInEmptyArea = !isInContentBounds(x, y); mTouchSlopExceeded = mTouchSlopExceededBeforeDown; mMotionAborted = false; @@ -6333,7 +6341,8 @@ public final class NotificationPanelViewController implements Dumpable { final float x = event.getX(pointerIndex); final float y = event.getY(pointerIndex); - if (event.getActionMasked() == MotionEvent.ACTION_DOWN) { + if (event.getActionMasked() == MotionEvent.ACTION_DOWN + || event.getActionMasked() == MotionEvent.ACTION_MOVE) { mGestureWaitForTouchSlop = shouldGestureWaitForTouchSlop(); mIgnoreXTouchSlop = true; } |