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
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user