diff options
author | Jeff Brown <jeffbrown@google.com> | 2014-08-21 21:41:09 -0700 |
---|---|---|
committer | Jeff Brown <jeffbrown@google.com> | 2014-08-21 22:20:55 -0700 |
commit | 72671fbb2036e13fccb0b8eeb98be606de1819dd (patch) | |
tree | b39d060ae2b56add9cde0c11d7f2598e0b50e559 /core/java/android | |
parent | a71f03c48160ee82aad8d05edeb39faaf95ae137 (diff) | |
download | frameworks_base-72671fbb2036e13fccb0b8eeb98be606de1819dd.zip frameworks_base-72671fbb2036e13fccb0b8eeb98be606de1819dd.tar.gz frameworks_base-72671fbb2036e13fccb0b8eeb98be606de1819dd.tar.bz2 |
Require DEVICE_POWER permission for DOZE_WAKE_LOCK.
This wake lock is only intended to be used internally.
Change-Id: I8d109c492605673616cf7f4f31f082a42fb1d912
Diffstat (limited to 'core/java/android')
-rw-r--r-- | core/java/android/os/PowerManager.java | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/core/java/android/os/PowerManager.java b/core/java/android/os/PowerManager.java index b167549..67ec563 100644 --- a/core/java/android/os/PowerManager.java +++ b/core/java/android/os/PowerManager.java @@ -195,6 +195,8 @@ public final class PowerManager { * <p> * This is used by the dream manager to implement doze mode. It currently * has no effect unless the power manager is in the dozing state. + * </p><p> + * Requires the {@link android.Manifest.permission#DEVICE_POWER} permission. * </p> * * {@hide} @@ -331,6 +333,12 @@ public final class PowerManager { public static final int GO_TO_SLEEP_REASON_HDMI = 5; /** + * Go to sleep flag: Skip dozing state and directly go to full sleep. + * @hide + */ + public static final int GO_TO_SLEEP_FLAG_NO_DOZE = 1 << 0; + + /** * The value to pass as the 'reason' argument to reboot() to * reboot into recovery mode (for applying system updates, doing * factory resets, etc.). @@ -343,12 +351,6 @@ public final class PowerManager { */ public static final String REBOOT_RECOVERY = "recovery"; - /** - * Go to sleep flag: Skip dozing state and directly go to full sleep. - * @hide - */ - public static final int GO_TO_SLEEP_FLAG_NO_DOZE = 1 << 0; - final Context mContext; final IPowerManager mService; final Handler mHandler; |