summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Justin Weir <justinweir@google.com> 2023-03-02 16:06:23 -0500
committer Justin Weir <justinweir@google.com> 2023-03-03 14:32:17 +0000
commit5336e8103822e98e403e5ae50f146001491d76b1 (patch)
tree26f6ba7e1672c860cd74e55721f20c1e77786413
parentf5c58b6765202aa74c84c0edf26a1accee254d48 (diff)
Disallow interception of multitouch events
The shade mishandles multitouch events when the first touch originates in the status bar, which results in the second touch being an ACTION_DOWN instead of ACTION_POINTER_DOWN. This causes multiple problems, so it's preferable to not intercept these events when we detect them. Fixes: 198553252 Test: manual and atest Change-Id: Ib420e0aa207610d5493e7db904eaf31da221a2bf
-rw-r--r--packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java b/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java
index e53eea90ad33..e71cb157364c 100644
--- a/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java
+++ b/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java
@@ -4628,8 +4628,13 @@ public final class NotificationPanelViewController implements Dumpable {
gesture possible. */
int pointerIndex = event.findPointerIndex(mTrackingPointer);
if (pointerIndex < 0) {
- pointerIndex = 0;
- mTrackingPointer = event.getPointerId(pointerIndex);
+ if (mTrackingPointer < 0) {
+ pointerIndex = 0;
+ mTrackingPointer = event.getPointerId(pointerIndex);
+ } else {
+ mShadeLog.logMotionEvent(event, "Skipping intercept of multitouch pointer");
+ return false;
+ }
}
final float x = event.getX(pointerIndex);
final float y = event.getY(pointerIndex);