summaryrefslogtreecommitdiffstats
path: root/core/java/android/view/Display.java
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2014-07-17 18:50:18 -0700
committerJeff Brown <jeffbrown@google.com>2014-07-18 21:28:18 -0700
commit5dc219142a756d57355b511c8f8ab913c01710da (patch)
treeede90f23cc7e80d6393e1cab3bff94f4ec866609 /core/java/android/view/Display.java
parent31380e84246844cf709ea13769679240ff2b48e6 (diff)
downloadframeworks_base-5dc219142a756d57355b511c8f8ab913c01710da.zip
frameworks_base-5dc219142a756d57355b511c8f8ab913c01710da.tar.gz
frameworks_base-5dc219142a756d57355b511c8f8ab913c01710da.tar.bz2
Add new Display.STATE_DOZE_SUSPEND power state.
Change-Id: Ia62f4f0d25234281dc600d0b7f08b3c6a312db7a
Diffstat (limited to 'core/java/android/view/Display.java')
-rw-r--r--core/java/android/view/Display.java28
1 files changed, 22 insertions, 6 deletions
diff --git a/core/java/android/view/Display.java b/core/java/android/view/Display.java
index 76a6f52..b17fa4a 100644
--- a/core/java/android/view/Display.java
+++ b/core/java/android/view/Display.java
@@ -225,13 +225,27 @@ public final class Display {
public static final int STATE_ON = 2;
/**
- * Display state: The display is dozing in a low-power state; it may be showing
- * system-provided content while the device is in a non-interactive state.
+ * Display state: The display is dozing in a low power state; it is still
+ * on but is optimized for showing system-provided content while the
+ * device is non-interactive.
*
* @see #getState
* @see android.os.PowerManager#isInteractive
*/
- public static final int STATE_DOZING = 3;
+ public static final int STATE_DOZE = 3;
+
+ /**
+ * Display state: The display is dozing in a suspended low power state; it is still
+ * on but is optimized for showing static system-provided content while the device
+ * is non-interactive. This mode may be used to conserve even more power by allowing
+ * the hardware to stop applying frame buffer updates from the graphics subsystem or
+ * to take over the display and manage it autonomously to implement low power always-on
+ * display functionality.
+ *
+ * @see #getState
+ * @see android.os.PowerManager#isInteractive
+ */
+ public static final int STATE_DOZE_SUSPEND = 4;
/**
* Internal method to create a display.
@@ -697,7 +711,7 @@ public final class Display {
* Gets the state of the display, such as whether it is on or off.
*
* @return The state of the display: one of {@link #STATE_OFF}, {@link #STATE_ON},
- * {@link #STATE_DOZING}, or {@link #STATE_UNKNOWN}.
+ * {@link #STATE_DOZE}, {@link #STATE_DOZE_SUSPEND}, or {@link #STATE_UNKNOWN}.
*/
public int getState() {
synchronized (this) {
@@ -809,8 +823,10 @@ public final class Display {
return "OFF";
case STATE_ON:
return "ON";
- case STATE_DOZING:
- return "DOZING";
+ case STATE_DOZE:
+ return "DOZE";
+ case STATE_DOZE_SUSPEND:
+ return "DOZE_SUSPEND";
default:
return Integer.toString(state);
}