Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e8e2b672 authored by Adam Powell's avatar Adam Powell Committed by Android (Google) Code Review
Browse files

Merge "Further tweak touchMajor/Minor stabilization in ScaleGestureDetector" into jb-mr1-dev

parents 9703880d d736d206
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -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();