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

Commit 3d7a7250 authored by Louis Chang's avatar Louis Chang Committed by Automerger Merge Worker
Browse files

Merge "Directly hide the surface of the invisible activity if display rotates"...

Merge "Directly hide the surface of the invisible activity if display rotates" into udc-dev am: 75045cbd am: 771388a9

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/22555226



Change-Id: I527dcb9287d2cf3c22ba3cd82a2bfbc16c24c0ee
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 2eb31717 771388a9
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)) {