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

Commit b54dd7f8 authored by Chris Li's avatar Chris Li
Browse files

Revert^2 "Make sure the parent change is set for changes with intermediate parent"

This reverts commit 9af48772.

Reason for revert: Reland CL

The previous submit caused test failure because it hides independent
closing window, but the surface wasn't got show in the following cases:
1. Recent transition without top Task change.
2. Recent transition with changing top split, the following transition
   doesn't include leaf task as independent change.
To prevent that, this CL remove the hide logic from the previous submit.
Will have followup CL to address the hide issue.

Bug: 328014766
Change-Id: If6c12d4c4ee3b19abbe1fe4307dd4acae35e5cf8
Test: verify with system split using Settings.
Test: atest WMShellFlickerServicePlatinumTests
     :SwitchBetweenSplitPairsGesturalNavLandscape
parent a3b836fd
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -542,6 +542,9 @@ public final class TransitionInfo implements Parcelable {
        // independent either.
        if (change.getMode() == TRANSIT_CHANGE) return false;

        // Always fold the activity embedding change into the parent change.
        if (change.hasFlags(FLAG_IN_TASK_WITH_EMBEDDED_ACTIVITY)) return false;

        TransitionInfo.Change parentChg = info.getChange(change.getParent());
        while (parentChg != null) {
            // If the parent is a visibility change, it will include the results of all child
+3 −0
Original line number Diff line number Diff line
@@ -496,6 +496,7 @@ public class Transitions implements RemoteCallable<Transitions>,
            if (mode == TRANSIT_TO_FRONT) {
                // When the window is moved to front, make sure the crop is updated to prevent it
                // from using the old crop.
                t.setPosition(leash, change.getEndRelOffset().x, change.getEndRelOffset().y);
                t.setWindowCrop(leash, change.getEndAbsBounds().width(),
                        change.getEndAbsBounds().height());
            }
@@ -507,6 +508,8 @@ public class Transitions implements RemoteCallable<Transitions>,
                    t.setMatrix(leash, 1, 0, 0, 1);
                    t.setAlpha(leash, 1.f);
                    t.setPosition(leash, change.getEndRelOffset().x, change.getEndRelOffset().y);
                    t.setWindowCrop(leash, change.getEndAbsBounds().width(),
                            change.getEndAbsBounds().height());
                }
                continue;
            }
+9 −1
Original line number Diff line number Diff line
@@ -2468,7 +2468,15 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener {
            for (WindowContainer<?> p = getAnimatableParent(wc); p != null;
                    p = getAnimatableParent(p)) {
                final ChangeInfo parentChange = changes.get(p);
                if (parentChange == null || !parentChange.hasChanged()) break;
                if (parentChange == null) {
                    break;
                }
                if (!parentChange.hasChanged()) {
                    // In case the target is collected after the parent has been changed, it could
                    // be too late to snapshot the parent change. Skip to see if there is any
                    // parent window further up to be considered as change parent.
                    continue;
                }
                if (p.mRemoteToken == null) {
                    // Intermediate parents must be those that has window to be managed by Shell.
                    continue;