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

Commit 75045cbd authored by Louis Chang's avatar Louis Chang Committed by Android (Google) Code Review
Browse files

Merge "Directly hide the surface of the invisible activity if display rotates" into udc-dev

parents f1eb7928 c2c0c4d8
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -327,6 +327,7 @@ public class DefaultTransitionHandler implements Transitions.TransitionHandler {

        @ColorInt int backgroundColorForTransition = 0;
        final int wallpaperTransit = getWallpaperTransitType(info);
        boolean isDisplayRotationAnimationStarted = false;
        for (int i = info.getChanges().size() - 1; i >= 0; --i) {
            final TransitionInfo.Change change = info.getChanges().get(i);
            if (change.hasAllFlags(FLAG_IN_TASK_WITH_EMBEDDED_ACTIVITY
@@ -350,6 +351,7 @@ public class DefaultTransitionHandler implements Transitions.TransitionHandler {
                    if (!(isSeamlessDisplayChange || anim == ROTATION_ANIMATION_JUMPCUT)) {
                        startRotationAnimation(startTransaction, change, info, anim, animations,
                                onAnimFinish);
                        isDisplayRotationAnimationStarted = true;
                        continue;
                    }
                } else {
@@ -405,6 +407,14 @@ public class DefaultTransitionHandler implements Transitions.TransitionHandler {
                }
            }

            // Hide the invisible surface directly without animating it if there is a display
            // rotation animation playing.
            if (isDisplayRotationAnimationStarted && TransitionUtil.isClosingType(
                    change.getMode())) {
                startTransaction.hide(change.getLeash());
                continue;
            }

            // The back gesture has animated this change before transition happen, so here we don't
            // play the animation again.
            if (change.hasFlags(FLAG_BACK_GESTURE_ANIMATED)) {