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 'reset' to reset all gesture states. This patch also refactor the power key and back key if the long press behavior is enabled. The detector can detect below gestures: - single press - long press - very long press - multiple presses (press count > 1) Bug: 169058831 Bug: 127687575 Test: atest KeyEventTest SingleKeyGestureTests Test: atest GlobalActionsImeTest PowerButtonTest Test: manual (short press power, long press power, double tap power) Change-Id: I28ff4373ba57b16e580b8eaaca26a3fa81770d0f
Loading
Please register or sign in to comment