summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author David Stevens <stevensd@google.com> 2017-08-23 18:19:23 -0700
committer David Stevens <stevensd@google.com> 2017-08-23 18:42:00 -0700
commit5a9ecee75b9230218f012d41ee137724e03c01e5 (patch)
tree8645f24fb6612cd9515c6170e7da079bb2265b53
parent0d008e32047f009d37bf6185a958a451df822e2c (diff)
Check correct DisplayContent when making window freezing screen
When an AppWindowToken is made visible, it checks if any of its windows are in a state that necessitates freezing the screen. Windows should check whether their DisplayContent is ready, not whether the default display is ready. For apps on secondary displays, the incorrect check was causing spurious orientation changes for their starting window if the primary display was off, which was interrupting the task transition animation. Bug: 34280365 Test: manual Change-Id: Ifd3be2aedc32c42f3c3f1b15f9f0a69a839f8c62
-rw-r--r--services/core/java/com/android/server/wm/WindowManagerService.java5
1 files changed, 1 insertions, 4 deletions
diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java
index a65f690d8e1d..1ac0019f1bae 100644
--- a/services/core/java/com/android/server/wm/WindowManagerService.java
+++ b/services/core/java/com/android/server/wm/WindowManagerService.java
@@ -5811,10 +5811,7 @@ public class WindowManagerService extends IWindowManager.Stub
// If the screen is currently frozen or off, then keep
// it frozen/off until this window draws at its new
// orientation.
- // TODO (multidisplay): Support screen freezing on secondary displays.
- final DisplayContent dc = mRoot.getDisplayContent(DEFAULT_DISPLAY);
- if ((dc == null || !dc.okToDisplay())
- && mWindowsFreezingScreen != WINDOWS_FREEZING_SCREENS_TIMEOUT) {
+ if (!w.mToken.okToDisplay() && mWindowsFreezingScreen != WINDOWS_FREEZING_SCREENS_TIMEOUT) {
if (DEBUG_ORIENTATION) Slog.v(TAG_WM, "Changing surface while display frozen: " + w);
w.setOrientationChanging(true);
w.mLastFreezeDuration = 0;