summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--services/core/java/com/android/server/wm/WindowState.java13
1 files changed, 7 insertions, 6 deletions
diff --git a/services/core/java/com/android/server/wm/WindowState.java b/services/core/java/com/android/server/wm/WindowState.java
index f36b692135f3..c4185fa9a599 100644
--- a/services/core/java/com/android/server/wm/WindowState.java
+++ b/services/core/java/com/android/server/wm/WindowState.java
@@ -2284,13 +2284,14 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
// interactive, the value may persist until the next animation, which could potentially
// be occurring while turning off the screen. This would lead to the screen incorrectly
// turning back on.
- if (hasTurnScreenOnFlag && allowTheaterMode && canTurnScreenOn
- && !mPowerManagerWrapper.isInteractive()) {
- if (DEBUG_VISIBILITY || DEBUG_POWER) {
- Slog.v(TAG, "Relayout window turning screen on: " + this);
+ if (hasTurnScreenOnFlag) {
+ if (allowTheaterMode && canTurnScreenOn && !mPowerManagerWrapper.isInteractive()) {
+ if (DEBUG_VISIBILITY || DEBUG_POWER) {
+ Slog.v(TAG, "Relayout window turning screen on: " + this);
+ }
+ mPowerManagerWrapper.wakeUp(SystemClock.uptimeMillis(),
+ "android.server.wm:TURN_ON");
}
- mPowerManagerWrapper.wakeUp(SystemClock.uptimeMillis(),
- "android.server.wm:TURN_ON");
if (mAppToken != null) {
mAppToken.setCanTurnScreenOn(false);