summaryrefslogtreecommitdiff
path: root/core/java/android/view/Display.java
diff options
context:
space:
mode:
authorMichael Wright <michaelwr@google.com>2017-07-20 18:18:33 +0100
committerMichael Wright <michaelwr@google.com>2017-07-20 18:21:29 +0100
commit05e76fe38fa797c12507ad26719797b3fe2a1308 (patch)
tree8027994698e9cd0b783e3e3e4ae1766623497333 /core/java/android/view/Display.java
parent3789b629c7bd18711c350ecc54587ceaed73de52 (diff)
Add config to force display to transition to off after doze
Some display hardware can't do the transition from doze display states to the on display state cleanly, so in order to hide any janky-ness of the transition we force the display off and cover the screen with a black surface. This lets us keep the screen black until SystemUI and the display are both ready. Bug: 63531607 Test: manual Change-Id: I66bd483e5f01e1dbd5069465aa122828af5f1903
Diffstat (limited to 'core/java/android/view/Display.java')
-rw-r--r--core/java/android/view/Display.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/core/java/android/view/Display.java b/core/java/android/view/Display.java
index 7346a215ed8e..263d3ff423c5 100644
--- a/core/java/android/view/Display.java
+++ b/core/java/android/view/Display.java
@@ -1133,6 +1133,15 @@ public final class Display {
}
/**
+ * Returns true if the display may be in a reduced operating mode while in the
+ * specified display power state.
+ * @hide
+ */
+ public static boolean isDozeState(int state) {
+ return state == STATE_DOZE || state == STATE_DOZE_SUSPEND;
+ }
+
+ /**
* A mode supported by a given display.
*
* @see Display#getSupportedModes()