Skip to content
Commit 2188e105 authored by Arthur Hung's avatar Arthur Hung
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 '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
parent af76755f
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