diff options
author | 2023-04-13 04:43:41 +0000 | |
---|---|---|
committer | 2023-04-13 04:43:41 +0000 | |
commit | 75045cbdf9f7859f91fbd2f5232fe3dc0783eb4b (patch) | |
tree | 12d529e3938a5a87c660d5b8c13acbee631dd022 | |
parent | f1eb79280b07eb8c0acfea8036c8a7edbd69116e (diff) | |
parent | c2c0c4d879c6de5361ac3d9e8ea50b3b427548af (diff) |
Merge "Directly hide the surface of the invisible activity if display rotates" into udc-dev
-rw-r--r-- | libs/WindowManager/Shell/src/com/android/wm/shell/transition/DefaultTransitionHandler.java | 10 |
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)) { |