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

Commit b9b37918 authored by Evan Rosky's avatar Evan Rosky Committed by Android (Google) Code Review
Browse files

Merge "Maintain relative order of changes during CHANGE transits" into 24D1-dev

parents 7b40c330 58ce796a
Loading
Loading
Loading
Loading
+5 −6
Original line number Diff line number Diff line
@@ -31,7 +31,6 @@ import static android.view.WindowManager.fixScale;
import static android.window.TransitionInfo.FLAG_BACK_GESTURE_ANIMATED;
import static android.window.TransitionInfo.FLAG_IS_BEHIND_STARTING_WINDOW;
import static android.window.TransitionInfo.FLAG_IS_OCCLUDED;
import static android.window.TransitionInfo.FLAG_MOVED_TO_TOP;
import static android.window.TransitionInfo.FLAG_NO_ANIMATION;
import static android.window.TransitionInfo.FLAG_STARTING_WINDOW_TRANSFER_RECIPIENT;

@@ -538,15 +537,15 @@ public class Transitions implements RemoteCallable<Transitions>,
        final int mode = change.getMode();
        // Put all the OPEN/SHOW on top
        if (mode == TRANSIT_OPEN || mode == TRANSIT_TO_FRONT) {
            if (isOpening
                    // This is for when an activity launches while a different transition is
                    // collecting.
                    || change.hasFlags(FLAG_MOVED_TO_TOP)) {
            if (isOpening) {
                // put on top
                return zSplitLine + numChanges - i;
            } else {
            } else if (isClosing) {
                // put on bottom
                return zSplitLine - i;
            } else {
                // maintain relative ordering (put all changes in the animating layer)
                return zSplitLine + numChanges - i;
            }
        } else if (mode == TRANSIT_CLOSE || mode == TRANSIT_TO_BACK) {
            if (isOpening) {