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

Commit 8efc7aea authored by Tiger's avatar Tiger
Browse files

Put the change to top if it has FLAG_MOVED_TO_TOP

This CL also refines the debug strings of TRANSIT_TO_FRONT and
TRANSIT_TO_BACK to make the naming rule consistent.

Fix: 283076194
Test: Swipe to home from a landscape app and quickly open it again. See
      if the home screen is on top of the app during the transition.
Change-Id: Ic8dba8c19e2447d8192898642d8499dec2a344c3
parent 3816d9b9
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -424,8 +424,8 @@ public final class TransitionInfo implements Parcelable {
            case TRANSIT_NONE: return "NONE";
            case TRANSIT_OPEN: return "OPEN";
            case TRANSIT_CLOSE: return "CLOSE";
            case TRANSIT_TO_FRONT: return "SHOW";
            case TRANSIT_TO_BACK: return "HIDE";
            case TRANSIT_TO_FRONT: return "TO_FRONT";
            case TRANSIT_TO_BACK: return "TO_BACK";
            case TRANSIT_CHANGE: return "CHANGE";
            default: return "<unknown:" + mode + ">";
        }
+5 −1
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@ import static android.view.WindowManager.TRANSIT_TO_FRONT;
import static android.view.WindowManager.fixScale;
import static android.window.TransitionInfo.FLAG_IS_OCCLUDED;
import static android.window.TransitionInfo.FLAG_IS_WALLPAPER;
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;

@@ -554,7 +555,10 @@ public class Transitions implements RemoteCallable<Transitions>,
                    layer = -zSplitLine - i;
                }
            } else if (mode == TRANSIT_OPEN || mode == TRANSIT_TO_FRONT) {
                if (isOpening) {
                if (isOpening
                        // This is for when an activity launches while a different transition is
                        // collecting.
                        || change.hasFlags(FLAG_MOVED_TO_TOP)) {
                    // put on top
                    layer = zSplitLine + numChanges - i;
                } else {