Merge changes I990693ac,Ibcae2a5a

* changes:
  MultiFingerSwipe: scale touch slop to number of fingers.
  Use correct touch slop value for two-finger passthrough.
This commit is contained in:
TreeHugger Robot
2020-08-26 16:46:52 +00:00
committed by Android (Google) Code Review
2 changed files with 2 additions and 2 deletions

View File

@@ -294,7 +294,7 @@ class MultiFingerSwipe extends GestureMatcher {
+ Float.toString(mGestureDetectionThresholdPixels));
}
if (getState() == STATE_CLEAR) {
if (moveDelta < mTouchSlop) {
if (moveDelta < (mTargetFingerCount * mTouchSlop)) {
// This still counts as a touch not a swipe.
continue;
} else if (mStrokeBuffers[pointerIndex].size() == 0) {

View File

@@ -608,7 +608,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;
}
}