Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fbb26565 authored by wilsonshih's avatar wilsonshih
Browse files

Avoid collect window token which should be rotate independently

Previous in c0694d47 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
parent f52b4988
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -473,9 +473,10 @@ class TransitionController {
        // Collect all visible non-app windows which need to be drawn before the animation starts.
        // Collect all visible non-app windows which need to be drawn before the animation starts.
        final DisplayContent dc = wc.asDisplayContent();
        final DisplayContent dc = wc.asDisplayContent();
        if (dc != null) {
        if (dc != null) {
            final boolean noAsyncRotation = dc.getAsyncRotationController() == null;
            wc.forAllWindows(w -> {
            wc.forAllWindows(w -> {
                if (w.mActivityRecord == null && w.isVisible() && !isCollecting(w.mToken)
                if (w.mActivityRecord == null && w.isVisible() && !isCollecting(w.mToken)
                        && dc.shouldSyncRotationChange(w)) {
                        && (noAsyncRotation || !AsyncRotationController.canBeAsync(w.mToken))) {
                    transition.collect(w.mToken);
                    transition.collect(w.mToken);
                }
                }
            }, true /* traverseTopToBottom */);
            }, true /* traverseTopToBottom */);