summaryrefslogtreecommitdiff
path: root/core/java/android/view/KeyEvent.java
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2010-11-01 15:24:01 -0700
committerJeff Brown <jeffbrown@google.com>2010-11-02 17:31:39 -0700
commitb0418da0e7594a8c2164a46985c5f1993632e010 (patch)
treef73f81b31796d4f75ef6530d1fb883fccc74031f /core/java/android/view/KeyEvent.java
parentc68134b74016b82e0c49c47b89d93b2d0921cbe5 (diff)
Add plumbing for volume mute key.
Full support for the volume mute key will be implemented in a later change. Bug: 2912307 Change-Id: I98c27d6360f159c8b7447e04b45f442eff87b38a
Diffstat (limited to 'core/java/android/view/KeyEvent.java')
-rwxr-xr-xcore/java/android/view/KeyEvent.java17
1 files changed, 13 insertions, 4 deletions
diff --git a/core/java/android/view/KeyEvent.java b/core/java/android/view/KeyEvent.java
index 0e75682af8a3..04c331fe6082 100755
--- a/core/java/android/view/KeyEvent.java
+++ b/core/java/android/view/KeyEvent.java
@@ -125,9 +125,11 @@ public class KeyEvent extends InputEvent implements Parcelable {
/** Key code constant: Directional Pad Center key.
* May also be synthesized from trackball motions. */
public static final int KEYCODE_DPAD_CENTER = 23;
- /** Key code constant: Volume Up key. */
+ /** Key code constant: Volume Up key.
+ * Adjusts the speaker volume up. */
public static final int KEYCODE_VOLUME_UP = 24;
- /** Key code constant: Volume Down key. */
+ /** Key code constant: Volume Down key.
+ * Adjusts the speaker volume down. */
public static final int KEYCODE_VOLUME_DOWN = 25;
/** Key code constant: Power key. */
public static final int KEYCODE_POWER = 26;
@@ -269,7 +271,8 @@ public class KeyEvent extends InputEvent implements Parcelable {
public static final int KEYCODE_MEDIA_REWIND = 89;
/** Key code constant: Fast Forward media key. */
public static final int KEYCODE_MEDIA_FAST_FORWARD = 90;
- /** Key code constant: Mute key. */
+ /** Key code constant: Mute key.
+ * Mutes the microphone, unlike {@link #KEYCODE_VOLUME_MUTE}. */
public static final int KEYCODE_MUTE = 91;
/** Key code constant: Page Up key. */
public static final int KEYCODE_PAGE_UP = 92;
@@ -455,8 +458,13 @@ public class KeyEvent extends InputEvent implements Parcelable {
public static final int KEYCODE_NUMPAD_LEFT_PAREN = 162;
/** Key code constant: Numeric keypad ')' key. */
public static final int KEYCODE_NUMPAD_RIGHT_PAREN = 163;
+ /** Key code constant: Volume Mute key.
+ * Mutes the speaker, unlike {@link #KEYCODE_MUTE}.
+ * This key should normally be implemented as a toggle such that the first press
+ * mutes the speaker and the second press restores the original volume. */
+ public static final int KEYCODE_VOLUME_MUTE = 164;
- private static final int LAST_KEYCODE = KEYCODE_NUMPAD_RIGHT_PAREN;
+ private static final int LAST_KEYCODE = KEYCODE_VOLUME_MUTE;
// NOTE: If you add a new keycode here you must also add it to:
// isSystem()
@@ -640,6 +648,7 @@ public class KeyEvent extends InputEvent implements Parcelable {
"KEYCODE_NUMPAD_EQUALS",
"KEYCODE_NUMPAD_LEFT_PAREN",
"KEYCODE_NUMPAD_RIGHT_PAREN",
+ "KEYCODE_VOLUME_MUTE",
};
// Symbolic names of all metakeys in bit order from least significant to most significant.