summaryrefslogtreecommitdiffstats
path: root/core/java
diff options
context:
space:
mode:
authorJinsuk Kim <jinsukkim@google.com>2014-05-14 15:33:43 +0900
committerJinsuk Kim <jinsukkim@google.com>2014-05-20 00:43:38 +0000
commit96658f716779b4f2f5dd148cbf6df59d5a87ace4 (patch)
treee7c7bf5753f7f87a164e3aed13e39ca0dac6e45a /core/java
parentd6a91b0bb64b17dcf4ae635f428dfd4ad310f73e (diff)
downloadframeworks_base-96658f716779b4f2f5dd148cbf6df59d5a87ace4.zip
frameworks_base-96658f716779b4f2f5dd148cbf6df59d5a87ace4.tar.gz
frameworks_base-96658f716779b4f2f5dd148cbf6df59d5a87ace4.tar.bz2
New keycode definitions for HDMI-CEC
Following keys are added to be mapped to HDMI-CEC standard keys: KEYCODE_MEDIA_TOP_MENU KEYCODE_11 KEYCODE_12 KEYCODE_LAST_CHANNEL KEYCODE_TV_DATA_SERVICE Also updated the information on the key code update by removing some files not present any more. Change-Id: I305d9b578c1824f34c457144a68132717dc9a97f
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/view/InputDevice.java8
-rw-r--r--core/java/android/view/KeyEvent.java20
2 files changed, 24 insertions, 4 deletions
diff --git a/core/java/android/view/InputDevice.java b/core/java/android/view/InputDevice.java
index ae5f37e..358ae8a 100644
--- a/core/java/android/view/InputDevice.java
+++ b/core/java/android/view/InputDevice.java
@@ -234,6 +234,14 @@ public final class InputDevice implements Parcelable {
public static final int SOURCE_JOYSTICK = 0x01000000 | SOURCE_CLASS_JOYSTICK;
/**
+ * The input source is a device connected through HDMI-based bus.
+ *
+ * The key comes in through HDMI-CEC or MHL signal line, and is treated as if it were
+ * generated by a locally connected DPAD or keyboard.
+ */
+ public static final int SOURCE_HDMI = 0x02000000 | SOURCE_CLASS_BUTTON;
+
+ /**
* A special input source constant that is used when filtering input devices
* to match devices that provide any type of input source.
*/
diff --git a/core/java/android/view/KeyEvent.java b/core/java/android/view/KeyEvent.java
index b8e1b89..8a996d2 100644
--- a/core/java/android/view/KeyEvent.java
+++ b/core/java/android/view/KeyEvent.java
@@ -644,14 +644,26 @@ public class KeyEvent extends InputEvent implements Parcelable {
* devices or game controllers, especially if no other input mode is
* available. */
public static final int KEYCODE_PAIRING = 225;
-
- private static final int LAST_KEYCODE = KEYCODE_PAIRING;
+ /** Key code constant: Media Top Menu key.
+ * Goes to the top of media menu. */
+ public static final int KEYCODE_MEDIA_TOP_MENU = 226;
+ /** Key code constant: '11' key. */
+ public static final int KEYCODE_11 = 227;
+ /** Key code constant: '12' key. */
+ public static final int KEYCODE_12 = 228;
+ /** Key code constant: Last Channel key.
+ * Goes to the last viewed channel. */
+ public static final int KEYCODE_LAST_CHANNEL = 229;
+ /** Key code constant: TV data service key.
+ * Displays data services like weather, sports. */
+ public static final int KEYCODE_TV_DATA_SERVICE = 230;
+
+ private static final int LAST_KEYCODE = KEYCODE_TV_DATA_SERVICE;
// NOTE: If you add a new keycode here you must also add it to:
// isSystem()
// frameworks/native/include/android/keycodes.h
- // frameworks/base/include/androidfw/InputEventAttributes.h
- // external/webkit/WebKit/android/plugins/ANPKeyCodes.h
+ // frameworks/native/include/input/InputEventLabels.h
// frameworks/base/core/res/res/values/attrs.xml
// emulator?
// LAST_KEYCODE