diff options
| author | Michael Wright <michaelwr@google.com> | 2013-03-08 15:19:19 -0800 |
|---|---|---|
| committer | Michael Wright <michaelwr@google.com> | 2013-03-11 17:58:22 -0700 |
| commit | e7a9ae8ba0fb7fc61960e3facd0c5534e9ffce1e (patch) | |
| tree | cc5172cc643067df271ac91c222cc8336ffdc894 /core/java/android/view/InputDevice.java | |
| parent | 74e4156e5c62392c37f4a70358de30dcfff4956f (diff) | |
Add touch navigation input source
Bug: 8276741
Change-Id: I674b9804bf9ae76d694ae7073b54a7d43474a43c
Diffstat (limited to 'core/java/android/view/InputDevice.java')
| -rw-r--r-- | core/java/android/view/InputDevice.java | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/core/java/android/view/InputDevice.java b/core/java/android/view/InputDevice.java index c3dc76d81b99..dd523d23ea19 100644 --- a/core/java/android/view/InputDevice.java +++ b/core/java/android/view/InputDevice.java @@ -62,7 +62,14 @@ public final class InputDevice implements Parcelable { * specify the desired interpretation for its input events. */ public static final int SOURCE_CLASS_MASK = 0x000000ff; - + + /** + * The input source has no class. + * + * It is up to the application to determine how to handle the device based on the device type. + */ + public static final int SOURCE_CLASS_NONE = 0x00000000; + /** * The input source has buttons or keys. * Examples: {@link #SOURCE_KEYBOARD}, {@link #SOURCE_DPAD}. @@ -202,6 +209,17 @@ public final class InputDevice implements Parcelable { public static final int SOURCE_TOUCHPAD = 0x00100000 | SOURCE_CLASS_POSITION; /** + * The input source is a touch device whose motions should be interpreted as navigation events. + * + * For example, an upward swipe should be as an upward focus traversal in the same manner as + * pressing up on a D-Pad would be. Swipes to the left, right and down should be treated in a + * similar manner. + * + * @see #SOURCE_CLASS_NONE + */ + public static final int SOURCE_TOUCH_NAVIGATION = 0x00200000 | SOURCE_CLASS_NONE; + + /** * The input source is a joystick. * (It may also be a {@link #SOURCE_GAMEPAD}). * |
