diff options
| author | 2020-05-08 13:41:25 +0800 | |
|---|---|---|
| committer | 2020-05-08 13:45:05 +0800 | |
| commit | 3a057251ac660cbbb5d71145a97ee179247e3d4a (patch) | |
| tree | 748c69faa4fe26565149f3c6eb69b133e12afd5a | |
| parent | d59d694f114a96cefbb709b3ae4e032070a7238b (diff) | |
Make sure AmbiguousGestureMultiplier could start from 1
If a motion event classified CLASSIFICATION_AMBIGUOUS_GESTURE, it would
multiplied the AmbiguousGestureMultiplier from configuration for the
touch slop, we have to make sure this value should be start from 1 or
the touch slop could be zero and click action may fail.
Bug: 155160957
Test: manual
Change-Id: I61e1262b4f3de61214297b678956cc14fa2f24ef
| -rw-r--r-- | core/java/android/view/ViewConfiguration.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/java/android/view/ViewConfiguration.java b/core/java/android/view/ViewConfiguration.java index 69d37ab91a1c..0d2d4d13eb38 100644 --- a/core/java/android/view/ViewConfiguration.java +++ b/core/java/android/view/ViewConfiguration.java @@ -416,7 +416,7 @@ public class ViewConfiguration { com.android.internal.R.dimen.config_ambiguousGestureMultiplier, multiplierValue, true /*resolveRefs*/); - mAmbiguousGestureMultiplier = multiplierValue.getFloat(); + mAmbiguousGestureMultiplier = Math.max(1.0f, multiplierValue.getFloat()); // Size of the screen in bytes, in ARGB_8888 format final WindowManager windowManager = context.getSystemService(WindowManager.class); |