Skip to content
Commit 29f27e8d authored by arthurhung's avatar arthurhung
Browse files

Introduce SingleKeyGestureDetector to PhoneWindowManager

The SingleKeyGestureDetector is used to detect the single key gesture
such as short press, long press or multi presses.

If the key has been handled by other policy, it should call 'cancel'
to reset all gesture states.

This patch refactor the power key and back key (long press behavior
enabled), it can detect below gestures:
- single press
- long press
- very long press
- multiple press ( <= 3)

Bug: 169058831
Bug: 127687575
Test: atest KeyEventTest SingleKeyGestureTests
Test: manual (short press power, long press power, double tap power)
Change-Id: I1c042e693e9844e30ce568eded7681fa4101daf9
parent f6ed5fc5
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