diff options
author | Jaekyun Seok <jaekyun@google.com> | 2013-07-08 13:56:02 +0900 |
---|---|---|
committer | Jaekyun Seok <jaekyun@google.com> | 2013-07-12 17:23:45 +0900 |
commit | 8d06dcf9c663cccc44318c01c13f2b3ba0001b4c (patch) | |
tree | 5d873bcfd87f8e4e59774ddad49d89d93bd6ce8a | |
parent | 59a99aaad08e9d8163257ae67e562c69369d52a1 (diff) | |
download | frameworks_native-8d06dcf9c663cccc44318c01c13f2b3ba0001b4c.zip frameworks_native-8d06dcf9c663cccc44318c01c13f2b3ba0001b4c.tar.gz frameworks_native-8d06dcf9c663cccc44318c01c13f2b3ba0001b4c.tar.bz2 |
Add a keycode to switch audio tracks (2/2)
A key to switch audio tracks is general on media devices like blu-ray.
Bug: 9728155
Change-Id: I13ebbc64321f3cf10370f9a605f3d94ea0d16d6d
-rw-r--r-- | include/android/keycodes.h | 1 | ||||
-rw-r--r-- | include/input/KeycodeLabels.h | 1 | ||||
-rw-r--r-- | libs/input/Input.cpp | 2 |
3 files changed, 4 insertions, 0 deletions
diff --git a/include/android/keycodes.h b/include/android/keycodes.h index cf38d1a..1ca1332 100644 --- a/include/android/keycodes.h +++ b/include/android/keycodes.h @@ -265,6 +265,7 @@ enum { AKEYCODE_ASSIST = 219, AKEYCODE_BRIGHTNESS_DOWN = 220, AKEYCODE_BRIGHTNESS_UP = 221, + AKEYCODE_MEDIA_AUDIO_TRACK = 222, // NOTE: If you add a new keycode here you must also add it to several other files. // Refer to frameworks/base/core/java/android/view/KeyEvent.java for the full list. diff --git a/include/input/KeycodeLabels.h b/include/input/KeycodeLabels.h index c76ba12..c64c5d8 100644 --- a/include/input/KeycodeLabels.h +++ b/include/input/KeycodeLabels.h @@ -246,6 +246,7 @@ static const KeycodeLabel KEYCODES[] = { { "ASSIST", 219 }, { "BRIGHTNESS_DOWN", 220 }, { "BRIGHTNESS_UP", 221 }, + { "MEDIA_AUDIO_TRACK", 222 }, // NOTE: If you add a new keycode here you must also add it to several other files. // Refer to frameworks/base/core/java/android/view/KeyEvent.java for the full list. diff --git a/libs/input/Input.cpp b/libs/input/Input.cpp index 7a217c3..841f4bc 100644 --- a/libs/input/Input.cpp +++ b/libs/input/Input.cpp @@ -74,6 +74,7 @@ bool KeyEvent::hasDefaultAction(int32_t keyCode) { case AKEYCODE_MUTE: case AKEYCODE_BRIGHTNESS_DOWN: case AKEYCODE_BRIGHTNESS_UP: + case AKEYCODE_MEDIA_AUDIO_TRACK: return true; } @@ -112,6 +113,7 @@ bool KeyEvent::isSystemKey(int32_t keyCode) { case AKEYCODE_SEARCH: case AKEYCODE_BRIGHTNESS_DOWN: case AKEYCODE_BRIGHTNESS_UP: + case AKEYCODE_MEDIA_AUDIO_TRACK: return true; } |