a11y: Implement autoclick drag and move
To perform a dragging type click action 3 key phases need to be simulated: 1. Clicking and holding the left click button down - To simulate this action, only the motion events ACTION_DOWN and ACTION_BUTTON_PRESS are initiated. 2. Dragging the object around - Here the normal ACTION_HOVER_MOVE events need to be captured and transformed into ACTION_MOVE events to make the OS think the left click button is still being held down. - These ACTION_MOVE events needs to us the same `downTime` as the original ACTION_DOWN event. 3. Releasing the left click button - To simulate this action, only the motion events ACTION_BUTTON_RELEASE and ACTION_UP are initiated. - Here as well these events needs to use the same `downTime` as the original ACTION_DOWN event. - Since the MotionEvents are recycled and reused, use a copy of the underlying MotionEvent for doing test assertions. Demo: http://b/388847769#comment2 Bug: b/388847769 Test: AutoclickTypePanelTest Flag: com.android.server.accessibility.enable_autoclick_indicator Change-Id: I85522fc9707af6cfea2c21cdb31c8431984b02a5
Loading
Please register or sign in to comment