Intercept abnormal MotionEvent in GestureDetector#onTouchEvent
This could happen if an app started to send events to
GestureDetector.onTouchEvent without sending an ACTION_DOWN event first.
GestureDetector must see a complete event stream for a gesture to behave
correctly. A complete event stream is defined as:
-One ACTION_DOWN event
-Zero or more ACTION_MOVE events and matched pairs of
ACTION_POINTER_DOWN/ACTION_POINTER_UP
-One ACTION_UP or ACTION_CANCEL
Bug: 242021191
Test: run cts -m CtsViewTestCases -t android.view.cts.GestureDetectorTest
Change-Id: I22a5d1c162885d08ee7dfe9deef2aed0ed801d16
Signed-off-by: huyuxin <huyuxin@xiaomi.corp-partner.google.com>
Loading
Please register or sign in to comment