summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmeer Armaly <aarmaly@google.com>2020-08-25 19:00:17 -0700
committerAmeer Armaly <aarmaly@google.com>2020-10-11 08:04:43 -0700
commitbe8a943e46f53b1bceaa112349e03dfd4bb4c2e1 (patch)
tree41d057e69709e9382ce98477bdec5b8ab39db87e
parent81570aa5ade3cbaba15ca0517e0c7a5218fe04d1 (diff)
[DO NOT MERGE] Use correct touch slop value for two-finger passthrough.
Throughout the gesture system we scale the touch slop radius to the number of fingers that are down at any given moment. Therefore the correct value to trigger two-finger passthrough should be 2 * mTouchSlop. This should make three-finger taps less problematic. Bug: 163438921 Bug: 162521649 Test: manual Change-Id: I4b36b5575bf11ad767d83effd6292dc84eadb27d Change-Id: I9fb9d58ef679151c9fc595bcb375f6209ea3a5af Change-Id: Ibcae2a5a3fde37b97859165efabf2b0df13ded9b
-rw-r--r--services/accessibility/java/com/android/server/accessibility/gestures/TouchExplorer.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/services/accessibility/java/com/android/server/accessibility/gestures/TouchExplorer.java b/services/accessibility/java/com/android/server/accessibility/gestures/TouchExplorer.java
index 2b1e872420bc..bfb59f43aa1d 100644
--- a/services/accessibility/java/com/android/server/accessibility/gestures/TouchExplorer.java
+++ b/services/accessibility/java/com/android/server/accessibility/gestures/TouchExplorer.java
@@ -586,7 +586,7 @@ public class TouchExplorer extends BaseEventStreamTransformation
mReceivedPointerTracker.getReceivedPointerDownY(id)
- rawEvent.getY(index);
final double moveDelta = Math.hypot(deltaX, deltaY);
- if (moveDelta < mTouchSlop) {
+ if (moveDelta < (2 * mTouchSlop)) {
return;
}
}