diff options
| author | 2022-07-28 20:10:24 +0800 | |
|---|---|---|
| committer | 2022-07-29 15:34:57 +0800 | |
| commit | fbb265650b9a8c5ee73c5f70379951da7a226d7e (patch) | |
| tree | ddc226efd613b0bb0bb6c622230a69ff3b8be283 | |
| parent | f52b49886c3ad3a62109b704300e015c61674a8f (diff) | |
Avoid collect window token which should be rotate independently
Previous in c0694d4 we will preventing to do BLASTSync by check from
WindowToken#prepareSync, but those window can still be ask to sync
if the window was collect and another perform surface placement happen
after configuration change, for the continuous rotation test those
window can cause ANR on waiting for buffer. So instead of checking
from prepareSync, we can just ignore them when collect.
Bug: 209920544
Test: enable shell transition, run atest AppConfigurationTests
Test: atest TransitionTests#testDisplayRotationChange
Change-Id: If65b77bc25338489ba5f7d07119e0ef67ab79566
| -rw-r--r-- | services/core/java/com/android/server/wm/TransitionController.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/wm/TransitionController.java b/services/core/java/com/android/server/wm/TransitionController.java index a02be25bc8d2..6f4794ca8687 100644 --- a/services/core/java/com/android/server/wm/TransitionController.java +++ b/services/core/java/com/android/server/wm/TransitionController.java @@ -473,9 +473,10 @@ class TransitionController { // Collect all visible non-app windows which need to be drawn before the animation starts. final DisplayContent dc = wc.asDisplayContent(); if (dc != null) { + final boolean noAsyncRotation = dc.getAsyncRotationController() == null; wc.forAllWindows(w -> { if (w.mActivityRecord == null && w.isVisible() && !isCollecting(w.mToken) - && dc.shouldSyncRotationChange(w)) { + && (noAsyncRotation || !AsyncRotationController.canBeAsync(w.mToken))) { transition.collect(w.mToken); } }, true /* traverseTopToBottom */); |