From ab65c569d4d1084bc16340d317d6be1630048970 Mon Sep 17 00:00:00 2001 From: Riddle Hsu Date: Wed, 19 Jul 2023 09:57:36 +0000 Subject: [PATCH] Skip display rotation animation for non-change type transition A close/open transition can contain a display change. Then it should be either handled by CounterRotatorHelper (seamless-like) or existed fixed rotation transform. For example, when removing a task from live-tile (current app in recents) with a different orientation, it is a CLOSE transition from landscape to portrait while recents(home) is using fixed rotation. So it doesn't need a rotation animation. Bug: 288212397 Test: Launch app in landscape. Enter recents and swipe up the app to remove it. There is no additional rotation animation. Change-Id: I3dfd017440c881376ca0825f116d5b238e40569e --- .../android/wm/shell/transition/DefaultTransitionHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 e52fd00e7df7d..dc78c9b139f91 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 @@ -407,7 +407,7 @@ public class DefaultTransitionHandler implements Transitions.TransitionHandler { change.getEndAbsBounds().width(), change.getEndAbsBounds().height()); } // Rotation change of independent non display window container. - if (change.getParent() == null + if (change.getParent() == null && !change.hasFlags(FLAG_IS_DISPLAY) && change.getStartRotation() != change.getEndRotation()) { startRotationAnimation(startTransaction, change, info, ROTATION_ANIMATION_ROTATE, animations, onAnimFinish);