diff options
| author | Anthony Hugh <ahugh@google.com> | 2015-06-23 10:44:17 -0700 |
|---|---|---|
| committer | Anthony Hugh <ahugh@google.com> | 2015-07-15 13:34:25 -0700 |
| commit | 26fa501dd6bf906344dd6ba3ff4d110b735a3547 (patch) | |
| tree | 813a28722ee7182b6a1669bc83387c759e207164 /core/java/android/view/KeyEvent.java | |
| parent | 633a6c92af951c2cc410fda3ba5eaf5376949a7f (diff) | |
DO NOT MERGE: Introduce stem keycodes for Wear
Cherry-pick from master
This change adds four new stem keycodes for Android Wear. These
keycodes are intended to represent the various hardware buttons
around the watch. There is one primary stem key that will be used
for power/settings and three generic stem keys that will be
customizable.
BUG: 21903503
Change-Id: I867cf79554c72d42c8acbb3ff8b1678e482d4fe2
Diffstat (limited to 'core/java/android/view/KeyEvent.java')
| -rw-r--r-- | core/java/android/view/KeyEvent.java | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/core/java/android/view/KeyEvent.java b/core/java/android/view/KeyEvent.java index f6ce353906cd..678a66904495 100644 --- a/core/java/android/view/KeyEvent.java +++ b/core/java/android/view/KeyEvent.java @@ -761,8 +761,21 @@ public class KeyEvent extends InputEvent implements Parcelable { * Backs out one level of a navigation hierarchy or collapses the item that currently has * focus. */ public static final int KEYCODE_NAVIGATE_OUT = 263; - - private static final int LAST_KEYCODE = KEYCODE_NAVIGATE_OUT; + /** Key code constant: Primary stem key for Wear + * Main power/reset button on watch. + * @hide */ + public static final int KEYCODE_STEM_PRIMARY = 264; + /** Key code constant: Generic stem key 1 for Wear + * @hide */ + public static final int KEYCODE_STEM_1 = 265; + /** Key code constant: Generic stem key 2 for Wear + * @hide */ + public static final int KEYCODE_STEM_2 = 266; + /** Key code constant: Generic stem key 3 for Wear + * @hide */ + public static final int KEYCODE_STEM_3 = 267; + + private static final int LAST_KEYCODE = KEYCODE_STEM_3; // NOTE: If you add a new keycode here you must also add it to: // isSystem() |
