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

Commit a13f7f36 authored by Andrei Stingaceanu's avatar Andrei Stingaceanu
Browse files

GestureDetector - fix longPress timeout

Remove adding the TAP_TIMEOUT to the LONGPRESS_TIMEOUT
in order to inline the longpress detection logic with
the non-GestureDetector framework implementations.

Bug: 30895236
Bug: 30937837
Change-Id: I67f4fa141804ae645553eb4edc8a80a512d018c5
parent 70528f5b
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -583,10 +583,11 @@ public class GestureDetector {

            if (mIsLongpressEnabled) {
                mHandler.removeMessages(LONG_PRESS);
                mHandler.sendEmptyMessageAtTime(LONG_PRESS, mCurrentDownEvent.getDownTime()
                        + TAP_TIMEOUT + LONGPRESS_TIMEOUT);
                mHandler.sendEmptyMessageAtTime(LONG_PRESS,
                        mCurrentDownEvent.getDownTime() + LONGPRESS_TIMEOUT);
            }
            mHandler.sendEmptyMessageAtTime(SHOW_PRESS, mCurrentDownEvent.getDownTime() + TAP_TIMEOUT);
            mHandler.sendEmptyMessageAtTime(SHOW_PRESS,
                    mCurrentDownEvent.getDownTime() + TAP_TIMEOUT);
            handled |= mListener.onDown(ev);
            break;