summaryrefslogtreecommitdiffstats
path: root/core/java
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2014-03-07 23:39:12 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-03-07 23:39:12 +0000
commit6f9f8e7aad2f74bc2089a081139111012e62f7db (patch)
tree926da3b8a757a337d883cd3d99f134831e4baf77 /core/java
parent8e701650179c8373a4fc5bf306befc3af2560e9d (diff)
parent01b5e765e59c14cdfb62f1a8684e9116a46874d2 (diff)
downloadframeworks_base-6f9f8e7aad2f74bc2089a081139111012e62f7db.zip
frameworks_base-6f9f8e7aad2f74bc2089a081139111012e62f7db.tar.gz
frameworks_base-6f9f8e7aad2f74bc2089a081139111012e62f7db.tar.bz2
am 01b5e765: Merge "Declare KEYCODE_SLEEP and KEYCODE_WAKEUP." into klp-modular-dev
* commit '01b5e765e59c14cdfb62f1a8684e9116a46874d2': Declare KEYCODE_SLEEP and KEYCODE_WAKEUP.
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/view/KeyEvent.java14
1 files changed, 12 insertions, 2 deletions
diff --git a/core/java/android/view/KeyEvent.java b/core/java/android/view/KeyEvent.java
index 5a5fc10..6a6c127 100644
--- a/core/java/android/view/KeyEvent.java
+++ b/core/java/android/view/KeyEvent.java
@@ -629,11 +629,19 @@ public class KeyEvent extends InputEvent implements Parcelable {
/** Key code constant: Brightness Up key.
* Adjusts the screen brightness up. */
public static final int KEYCODE_BRIGHTNESS_UP = 221;
- /** Key code constant: Audio Track key
+ /** Key code constant: Audio Track key.
* Switches the audio tracks. */
public static final int KEYCODE_MEDIA_AUDIO_TRACK = 222;
+ /** Key code constant: Sleep key.
+ * Puts the device to sleep. Behaves somewhat like {@link #KEYCODE_POWER} but it
+ * has no effect if the device is already asleep. */
+ public static final int KEYCODE_SLEEP = 223;
+ /** Key code constant: Wakeup key.
+ * Wakes up the device. Behaves somewhat like {@link #KEYCODE_POWER} but it
+ * has no effect if the device is already awake. */
+ public static final int KEYCODE_WAKEUP = 224;
- private static final int LAST_KEYCODE = KEYCODE_MEDIA_AUDIO_TRACK;
+ private static final int LAST_KEYCODE = KEYCODE_WAKEUP;
// NOTE: If you add a new keycode here you must also add it to:
// isSystem()
@@ -878,6 +886,8 @@ public class KeyEvent extends InputEvent implements Parcelable {
names.append(KEYCODE_BRIGHTNESS_DOWN, "KEYCODE_BRIGHTNESS_DOWN");
names.append(KEYCODE_BRIGHTNESS_UP, "KEYCODE_BRIGHTNESS_UP");
names.append(KEYCODE_MEDIA_AUDIO_TRACK, "KEYCODE_MEDIA_AUDIO_TRACK");
+ names.append(KEYCODE_SLEEP, "KEYCODE_SLEEP");
+ names.append(KEYCODE_WAKEUP, "KEYCODE_WAKEUP");
};
// Symbolic names of all metakeys in bit order from least significant to most significant.