diff options
author | Nikita Dubrovsky <dubrovsky@google.com> | 2020-01-11 19:14:57 -0800 |
---|---|---|
committer | Nikita Dubrovsky <dubrovsky@google.com> | 2020-01-12 17:01:26 -0800 |
commit | b7e8cfc35607c0409551540c2cf90b97d21e0828 (patch) | |
tree | 5f8fbaeb959bcd5b1dd7b76b40511b7af05c0d17 /tools/aapt2/java/JavaClassGenerator_test.cpp | |
parent | 4dca994b24ff390db67558001d05df28687ce7e7 (diff) |
Handle ACTION_CANCEL in EditorTouchState (editable TextView)
When testDragAndDrop_longClick() performs the long-press, the events
triggered are ACTION_DOWN, ACTION_CANCEL, ACTION_DOWN, ACTION_CANCEL.
It's not clear why there is the additional ACTION_DOWN / ACTION_CANCEL
pair; performing the same gesture manually only produces a single
ACTION_DOWN / ACTION_CANCEL pair. Still, Editor should be able to handle
this scenario since ACTION_CANCEL is a valid event.
Previously there was no handling for ACTION_CANCEL in EditorTouchState
at all, so the sequence of events triggered by the test would end up
getting treated as a double-tap scenario and drag-and-drop would not be
started.
This CL adds handling for ACTION_CANCEL in EditorTouchState, attempting
to follow GestureDetector as closely as possible (essentially resetting
state whenever ACTION_CANCEL is received, so that subsequent events
start a "fresh sequence").
Bug: 29591177
Test: Manual and ran tests
atest FrameworksCoreTests:TextViewActivityMouseTest
atest FrameworksCoreTests:TextViewActivityTest
atest FrameworksCoreTests:EditorTouchStateTest
atest FrameworksCoreTests:EditorCursorDragTest
Change-Id: Ia0ee531af64083a4f670842188bdc7e35b617397
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions