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

Commit 5eb5652b authored by Evan Rosky's avatar Evan Rosky
Browse files

Ensure square displays will be in transition-root

Added check to prevent re-order-only displays from being
animated, however, the bounds comparison will still pass
for display rotations if the display is square. So, add
a check for rotation explicitly.

Bug: 415274390
Test: atest TransitionTests#testCommonAncestor_excludeOrderOnlyDisplay
Flag: EXEMPT bugfix
Change-Id: Ia9e0bae023853811b7b9af3ea72b1bca751758c1
parent 974719fb
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -666,7 +666,8 @@ public class Transitions implements RemoteCallable<Transitions>,
                continue;
            }
            // Don't reparent display level if only changing order (since root will be inside it).
            if (change.hasFlags(FLAG_IS_DISPLAY) && TransitionUtil.isOrderOnly(change)) {
            if (change.hasFlags(FLAG_IS_DISPLAY) && TransitionUtil.isOrderOnly(change)
                    && change.getStartRotation() == change.getEndRotation()) {
                continue;
            }

+2 −1
Original line number Diff line number Diff line
@@ -3358,7 +3358,8 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener {
                continue;
            }
            // Skip order-only display-level changes since the display itself isn't changing.
            if (wc.asDisplayContent() != null && isOrderOnly(change)) {
            if (wc.asDisplayContent() != null && isOrderOnly(change)
                    && change.mRotation == wc.getWindowConfiguration().getRotation()) {
                continue;
            }
            // Re-initiate the last parent as the initial ancestor instead of the top target.