am 22193893: am 610014e6: am 03fb5270: Add new Display.STATE_DOZE_SUSPEND power state.

* commit '22193893f7a79f1351caf157a8d6932e7ec3c825':
  Add new Display.STATE_DOZE_SUSPEND power state.
This commit is contained in:
Jeff Brown
2014-07-21 18:24:21 +00:00
committed by Android Git Automerger
5 changed files with 36 additions and 12 deletions

View File

@@ -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);
}

View File

@@ -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.