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
Loading
Please register or sign in to comment