summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorFilip Gruszczynski <gruszczy@google.com>2015-03-13 17:39:31 -0700
committerFilip Gruszczynski <gruszczy@google.com>2015-03-16 08:57:17 -0700
commit9779e128d611f13cdb44d31b0509ff43c62a35f6 (patch)
treed9ee53aaaa38ed1a6e54b67006b6aac0f0291de7 /core
parent5be1afedd8f2289ba047473b242cd0535a4493fe (diff)
downloadframeworks_base-9779e128d611f13cdb44d31b0509ff43c62a35f6.zip
frameworks_base-9779e128d611f13cdb44d31b0509ff43c62a35f6.tar.gz
frameworks_base-9779e128d611f13cdb44d31b0509ff43c62a35f6.tar.bz2
Option for going home when going to sleep for devices without physical button.
Bug: 19623388 Change-Id: Iec16f83c64646ded12ec97d4b540510b7f9dfd47
Diffstat (limited to 'core')
-rw-r--r--core/java/android/os/PowerManager.java6
-rwxr-xr-xcore/res/res/values/config.xml6
-rwxr-xr-xcore/res/res/values/symbols.xml1
3 files changed, 13 insertions, 0 deletions
diff --git a/core/java/android/os/PowerManager.java b/core/java/android/os/PowerManager.java
index e303f61..de970cb 100644
--- a/core/java/android/os/PowerManager.java
+++ b/core/java/android/os/PowerManager.java
@@ -364,6 +364,12 @@ public final class PowerManager {
public static final int GO_TO_SLEEP_REASON_HDMI = 5;
/**
+ * Go to sleep reason code: Going to sleep due to the sleep button being pressed.
+ * @hide
+ */
+ public static final int GO_TO_SLEEP_REASON_SLEEP_BUTTON = 6;
+
+ /**
* Go to sleep flag: Skip dozing state and directly go to full sleep.
* @hide
*/
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index 4fab5ab..3f020fd 100755
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -671,6 +671,12 @@
-->
<integer name="config_triplePressOnPowerBehavior">0</integer>
+ <!-- Control the behavior when the user presses the sleep button.
+ 0 - Go to sleep (doze)
+ 1 - Go to sleep (doze) and go home
+ -->
+ <integer name="config_shortPressOnSleepBehavior">0</integer>
+
<!-- Package name for default keyguard appwidget [DO NOT TRANSLATE] -->
<string name="widget_default_package_name"></string>
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index e7bd90a..26f8009 100755
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -368,6 +368,7 @@
<java-symbol type="integer" name="config_shortPressOnPowerBehavior" />
<java-symbol type="integer" name="config_toastDefaultGravity" />
<java-symbol type="integer" name="config_triplePressOnPowerBehavior" />
+ <java-symbol type="integer" name="config_shortPressOnSleepBehavior" />
<java-symbol type="integer" name="config_wifi_framework_scan_interval" />
<java-symbol type="integer" name="config_wifi_supplicant_scan_interval" />
<java-symbol type="integer" name="config_wifi_scan_interval_p2p_connected" />