Move stylus tail button gesture detection to PhoneWindowManager
Instead of having custom gesture detection logic in SystemUI for the
stylus tail button, we add a single key gesture detector in
PhoneWindowManager for KEYCODE_STYLUS_BUTTON_TAIL.
We then use the KeyGestureEventHandler in SysUI to listen to
the two shortcuts for opening notes, which includes the stylus tail
button.
This will make it easy to add additional behavior to other gestures for
the stylus tail button, such as long press and double press.
Bug: 293591411
Bug: 358569822
Test: atest KeyGestureEventTests
Test: atest NoteTaskInitializerTest
Flag: com.android.hardware.input.use_key_gesture_event_handler
Change-Id: I753229a2c48bd3e6ac8652de378491f3fc66bfa8
9 files changed