am e8e2b672: Merge "Further tweak touchMajor/Minor stabilization in ScaleGestureDetector" into jb-mr1-dev
* commit 'e8e2b672563fed2820e392de48226acf894cf06b': Further tweak touchMajor/Minor stabilization in ScaleGestureDetector
This commit is contained in:
@@ -146,7 +146,7 @@ public class ScaleGestureDetector {
|
|||||||
private int[] mTouchHistoryDirection;
|
private int[] mTouchHistoryDirection;
|
||||||
private long[] mTouchHistoryLastAcceptedTime;
|
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.
|
* Consistency verifier for debugging purposes.
|
||||||
@@ -192,7 +192,8 @@ public class ScaleGestureDetector {
|
|||||||
|
|
||||||
if (hasLastAccepted) {
|
if (hasLastAccepted) {
|
||||||
final int directionSig = (int) Math.signum(avg - mTouchHistoryLastAccepted[id]);
|
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;
|
mTouchHistoryDirection[id] = directionSig;
|
||||||
final long time = h < historySize ? ev.getHistoricalEventTime(h)
|
final long time = h < historySize ? ev.getHistoricalEventTime(h)
|
||||||
: ev.getEventTime();
|
: ev.getEventTime();
|
||||||
|
|||||||
Reference in New Issue
Block a user