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
This commit is contained in:
Riddle Hsu
2023-07-19 09:57:36 +00:00
parent 39759a9ed1
commit ab65c569d4

View File

@@ -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);