diff options
| author | 2012-09-25 19:30:44 -0700 | |
|---|---|---|
| committer | 2012-09-25 19:30:44 -0700 | |
| commit | d736d2069b94348b519089348f4a85eb482db668 (patch) | |
| tree | 570fadd0d718ebde36c28540ba20d1e72bca24c7 | |
| parent | b4693e25b1a576718eb669a74a056b3f1e451117 (diff) | |
Further tweak touchMajor/Minor stabilization in ScaleGestureDetector
Change-Id: Ifa717c7dee96c5a2eb18a414a257f01762365b00
| -rw-r--r-- | core/java/android/view/ScaleGestureDetector.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/core/java/android/view/ScaleGestureDetector.java b/core/java/android/view/ScaleGestureDetector.java index d97e335657c7..123ce2a92d9b 100644 --- a/core/java/android/view/ScaleGestureDetector.java +++ b/core/java/android/view/ScaleGestureDetector.java @@ -146,7 +146,7 @@ public class ScaleGestureDetector { private int[] mTouchHistoryDirection; private long[] mTouchHistoryLastAcceptedTime; - private static final long TOUCH_STABILIZE_TIME = 64; // ms + private static final long TOUCH_STABILIZE_TIME = 128; // ms /** * Consistency verifier for debugging purposes. @@ -192,7 +192,8 @@ public class ScaleGestureDetector { if (hasLastAccepted) { final int directionSig = (int) Math.signum(avg - mTouchHistoryLastAccepted[id]); - if (directionSig != mTouchHistoryDirection[id]) { + if (directionSig != mTouchHistoryDirection[id] || + (directionSig == 0 && mTouchHistoryDirection[id] == 0)) { mTouchHistoryDirection[id] = directionSig; final long time = h < historySize ? ev.getHistoricalEventTime(h) : ev.getEventTime(); |