Perform regular display transition with TaskView change
Originally, while a TaskView is on screen, the display transition
is either missing or interrupted (with flickering) by it.
The missing case is fixed by not return true for startAnimation
if the change info contains a display change.
The example of the interrupted case:
Display rotation changes. A display transition started.
Host of TaskView receives configuration change and
uses a new transition to update new bounds.
Display animation plays with old bounds of TaskView
because the new transition is queued.
Display animation is interrupted when the new transition
runs (the default merge will end the animation directly).
Now TaskViewTransitions will redirect the display transition to
DefaultTransitionHandler to play regular display animation. But
it still reports that the transition is handled by it. And then
when the TaskView bounds change transition is ready, its merge-
animation can be notified to set the end bounds directly without
interrupting the playing animation.
Also modify transitionHasBubbleEnterFromAppBubbleOrExistingBubble
to return only if the change is opening mode. Otherwise it may
mis-judge a rotating app bubble as creating a new bubble.
Bug: 414542717
Bug: 351813733
Flag: com.android.wm.shell.fix_task_view_rotation_animation
Test: atest TaskViewTransitionStartAnimationTest# \
testMergeAnimation_dispatchDisplayTransition
Test: Rotate display with an expanded bubble or the device
control from quick setting panel. A normal rotation
animation should run without flickering TaskView.
Change-Id: Ib4f1626818af728592b7285e8d95a5c533915648
4 files changed