Skip to content
Commit 9f45a12c authored by huyuxin's avatar huyuxin Committed by Alan Viverette
Browse files

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: default avatarhuyuxin <huyuxin@xiaomi.corp-partner.google.com>
parent b37c41d3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment