diff options
author | Jeff Brown <jeffbrown@google.com> | 2014-07-17 18:50:18 -0700 |
---|---|---|
committer | Jeff Brown <jeffbrown@google.com> | 2014-07-18 21:28:18 -0700 |
commit | 5dc219142a756d57355b511c8f8ab913c01710da (patch) | |
tree | ede90f23cc7e80d6393e1cab3bff94f4ec866609 /core | |
parent | 31380e84246844cf709ea13769679240ff2b48e6 (diff) | |
download | frameworks_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')
-rw-r--r-- | core/java/android/view/Display.java | 28 | ||||
-rw-r--r-- | core/java/android/view/SurfaceControl.java | 11 |
2 files changed, 30 insertions, 9 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); } diff --git a/core/java/android/view/SurfaceControl.java b/core/java/android/view/SurfaceControl.java index 94d8f70..bd46d07 100644 --- a/core/java/android/view/SurfaceControl.java +++ b/core/java/android/view/SurfaceControl.java @@ -213,22 +213,27 @@ public class SurfaceControl { /** * Display power mode off: used while blanking the screen. - * Use only with {@link SurfaceControl#setDisplayPowerMode()}. + * Use only with {@link SurfaceControl#setDisplayPowerMode}. */ public static final int POWER_MODE_OFF = 0; /** * Display power mode doze: used while putting the screen into low power mode. - * Use only with {@link SurfaceControl#setDisplayPowerMode()}. + * Use only with {@link SurfaceControl#setDisplayPowerMode}. */ public static final int POWER_MODE_DOZE = 1; /** * Display power mode normal: used while unblanking the screen. - * Use only with {@link SurfaceControl#setDisplayPowerMode()}. + * Use only with {@link SurfaceControl#setDisplayPowerMode}. */ public static final int POWER_MODE_NORMAL = 2; + /** + * Display power mode doze: used while putting the screen into a suspended + * low power mode. Use only with {@link SurfaceControl#setDisplayPowerMode}. + */ + public static final int POWER_MODE_DOZE_SUSPEND = 3; /** * Create a surface with a name. |