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

Commit aff90790 authored by Jean-Baptiste Queru's avatar Jean-Baptiste Queru Committed by Android Git Automerger
Browse files

am 4280891d: Merge "The bigger touch slop still has a problem"

* commit '4280891d':
  The bigger touch slop still has a problem
parents 3ebde8a2 4280891d
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -193,8 +193,7 @@ public class GestureDetector {
        }
    }

    // TODO: ViewConfiguration
    private int mBiggerTouchSlopSquare = 20 * 20;
    private int mBiggerTouchSlopSquare;

    private int mTouchSlopSquare;
    private int mDoubleTapSlopSquare;
@@ -408,6 +407,14 @@ public class GestureDetector {
        }
        mTouchSlopSquare = touchSlop * touchSlop;
        mDoubleTapSlopSquare = doubleTapSlop * doubleTapSlop;

        // The biggerTouchSlop should be a little bit bigger than touchSlop
        // and mBiggerTouchSlopSquare should not be over mDoubleTapSlopSquare.
        int biggerTouchSlop = (int)(touchSlop * 1.25f);
        mBiggerTouchSlopSquare = biggerTouchSlop * biggerTouchSlop;
        if (mBiggerTouchSlopSquare > mDoubleTapSlopSquare) {
            mBiggerTouchSlopSquare = mDoubleTapSlopSquare;
        }
    }

    /**