summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/transition/DefaultTransitionHandler.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/transition/DefaultTransitionHandler.java b/libs/WindowManager/Shell/src/com/android/wm/shell/transition/DefaultTransitionHandler.java
index 3dd10a098310..6e9ecdaf55e7 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/transition/DefaultTransitionHandler.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/transition/DefaultTransitionHandler.java
@@ -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)) {