diff options
| author | 2022-12-01 17:35:33 +0100 | |
|---|---|---|
| committer | 2022-12-07 11:46:17 +0100 | |
| commit | aa82260469f3e6f89f01cb7947d5059d3cb268d7 (patch) | |
| tree | c52a21872706d5523986e0d1c2a208ab5f983ca6 | |
| parent | 91824e804fd84a5d1ed0a1093e98058368de856c (diff) | |
Support sending KEYCODE_BACK from a VirtualDpad.
Bug: 233911853
Test: n/a
Change-Id: Ie37b3ed323a1d18cb306fd5e6d75b7fd36f084f9
| -rw-r--r-- | core/java/android/hardware/input/VirtualDpad.java | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/core/java/android/hardware/input/VirtualDpad.java b/core/java/android/hardware/input/VirtualDpad.java index 4d61553ccb52..8133472961a0 100644 --- a/core/java/android/hardware/input/VirtualDpad.java +++ b/core/java/android/hardware/input/VirtualDpad.java @@ -32,8 +32,8 @@ import java.util.Set; /** * A virtual dpad representing a key input mechanism on a remote device. * - * This registers an InputDevice that is interpreted like a physically-connected device and - * dispatches received events to it. + * <p>This registers an InputDevice that is interpreted like a physically-connected device and + * dispatches received events to it.</p> * * @hide */ @@ -44,6 +44,7 @@ public class VirtualDpad extends VirtualInputDevice { Collections.unmodifiableSet( new HashSet<>( Arrays.asList( + KeyEvent.KEYCODE_BACK, KeyEvent.KEYCODE_DPAD_UP, KeyEvent.KEYCODE_DPAD_DOWN, KeyEvent.KEYCODE_DPAD_LEFT, @@ -58,8 +59,15 @@ public class VirtualDpad extends VirtualInputDevice { /** * Sends a key event to the system. * - * Supported key codes are KEYCODE_DPAD_UP, KEYCODE_DPAD_DOWN, KEYCODE_DPAD_LEFT, - * KEYCODE_DPAD_RIGHT and KEYCODE_DPAD_CENTER, + * <p>Supported key codes are: + * <ul> + * <li>{@link KeyEvent.KEYCODE_DPAD_UP}</li> + * <li>{@link KeyEvent.KEYCODE_DPAD_DOWN}</li> + * <li>{@link KeyEvent.KEYCODE_DPAD_LEFT}</li> + * <li>{@link KeyEvent.KEYCODE_DPAD_RIGHT}</li> + * <li>{@link KeyEvent.KEYCODE_DPAD_CENTER}</li> + * <li>{@link KeyEvent.KEYCODE_BACK}</li> + * </ul> * * @param event the event to send */ |