From 10a4a64bcc046ca0429069ad6dc2d20b65279bc6 Mon Sep 17 00:00:00 2001 From: Chris Phoenix Date: Mon, 25 Sep 2017 13:21:00 -0700 Subject: SidekickService (base) Test: builds; Sidekick watch face animates in Ambient Change-Id: I5946dbf7194653ac4707b6c186b0a9197d125d5f --- core/java/android/view/Display.java | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) (limited to 'core/java/android/view/Display.java') diff --git a/core/java/android/view/Display.java b/core/java/android/view/Display.java index e7c3f92da830..6a44cdb9ee57 100644 --- a/core/java/android/view/Display.java +++ b/core/java/android/view/Display.java @@ -294,11 +294,10 @@ public final class Display { /** * 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. + * on but the CPU is not updating it. This may be used in one of two ways: to show + * static system-provided content while the device is non-interactive, or to allow + * a "Sidekick" compute resource to update the display. For this reason, the + * CPU must not control the display in this mode. * * @see #getState * @see android.os.PowerManager#isInteractive @@ -313,6 +312,18 @@ public final class Display { */ public static final int STATE_VR = 5; + /** + * Display state: The display is in a suspended full power state; it is still + * on but the CPU is not updating it. This may be used in one of two ways: to show + * static system-provided content while the device is non-interactive, or to allow + * a "Sidekick" compute resource to update the display. For this reason, the + * CPU must not control the display in this mode. + * + * @see #getState + * @see android.os.PowerManager#isInteractive + */ + public static final int STATE_ON_SUSPEND = 6; + /* The color mode constants defined below must be kept in sync with the ones in * system/core/include/system/graphics-base.h */ @@ -994,7 +1005,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_DOZE}, {@link #STATE_DOZE_SUSPEND}, or + * {@link #STATE_DOZE}, {@link #STATE_DOZE_SUSPEND}, {@link #STATE_ON_SUSPEND}, or * {@link #STATE_UNKNOWN}. */ public int getState() { @@ -1113,6 +1124,8 @@ public final class Display { return "DOZE_SUSPEND"; case STATE_VR: return "VR"; + case STATE_ON_SUSPEND: + return "ON_SUSPEND"; default: return Integer.toString(state); } @@ -1120,11 +1133,11 @@ public final class Display { /** * Returns true if display updates may be suspended while in the specified - * display power state. + * display power state. In SUSPEND states, updates are absolutely forbidden. * @hide */ public static boolean isSuspendedState(int state) { - return state == STATE_OFF || state == STATE_DOZE_SUSPEND; + return state == STATE_OFF || state == STATE_DOZE_SUSPEND || state == STATE_ON_SUSPEND; } /** -- cgit v1.2.3