summaryrefslogtreecommitdiff
path: root/core/java
diff options
context:
space:
mode:
authorNick Armstrong-Crews <strongarm@google.com>2015-09-08 05:28:51 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-09-08 05:28:51 +0000
commit13d2fa50b0815c63d2d289c27d8edacf1ace01eb (patch)
tree512318c4966c7891982deee745d74d9494b5a3aa /core/java
parentd70377b537450d03d5cdc2efb15977d48e5cfebd (diff)
parent740cf71c9978e5dcb0a68b6558531a52dc26d44f (diff)
am 740cf71c: am 56ecfcce: Handle KEYCODE_SOFT_SLEEP from Ungaze.
* commit '740cf71c9978e5dcb0a68b6558531a52dc26d44f': Handle KEYCODE_SOFT_SLEEP from Ungaze.
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/os/PowerManagerInternal.java6
-rw-r--r--core/java/android/view/KeyEvent.java5
2 files changed, 10 insertions, 1 deletions
diff --git a/core/java/android/os/PowerManagerInternal.java b/core/java/android/os/PowerManagerInternal.java
index e742f989c500..70cff00636ac 100644
--- a/core/java/android/os/PowerManagerInternal.java
+++ b/core/java/android/os/PowerManagerInternal.java
@@ -108,6 +108,12 @@ public abstract class PowerManagerInternal {
public abstract void setUserActivityTimeoutOverrideFromWindowManager(long timeoutMillis);
/**
+ * Used by the window manager to tell the power manager that the user is no longer actively
+ * using the device.
+ */
+ public abstract void setUserInactiveOverrideFromWindowManager();
+
+ /**
* Used by device administration to set the maximum screen off timeout.
*
* This method must only be called by the device administration policy manager.
diff --git a/core/java/android/view/KeyEvent.java b/core/java/android/view/KeyEvent.java
index 52852e7b6e97..052ef7c73e77 100644
--- a/core/java/android/view/KeyEvent.java
+++ b/core/java/android/view/KeyEvent.java
@@ -784,8 +784,11 @@ public class KeyEvent extends InputEvent implements Parcelable {
/** Key code constant: Step backward media key.
* Steps media backward, one frame at a time. */
public static final int KEYCODE_MEDIA_STEP_BACKWARD = 275;
+ /** Key code constant: put device to sleep unless a wakelock is held.
+ * @hide */
+ public static final int KEYCODE_SOFT_SLEEP = 276;
- private static final int LAST_KEYCODE = KEYCODE_MEDIA_STEP_BACKWARD;
+ private static final int LAST_KEYCODE = KEYCODE_SOFT_SLEEP;
// NOTE: If you add a new keycode here you must also add it to:
// isSystem()