Set TO_BACK to pausing tasks when merging a display change transition

It was lucky that WM core updates task surface visibility at a random
timing from Task#prepareSurface. Since WM core no longer touches surface
visibility if the container is in a transition, WM shell is responsible
to animate it correctly.

A real case: While recent animation is animating a split pair, rotate
the display. The recent animation will be canceled, and then
StageCoordinator may create new divider surface to SplitRoot task in
onTaskInfoChanged and startAnimation for display change. And if the
transition mode of SplitRoot is CHANGE, it will keep visible when
running the display rotation animation.

As pausing tasks will be occluded by home when canceling recents to
home. Their transition mode should be a closing type.

Fix: 424066334
Flag: EXEMPT bugfix
Test: atest RecentsTransitionHandlerTest# \
            testMerge_cancelToHome_onDisplayChange

Change-Id: I9bdf5d66f04e1057a7fb1336e5fc7ca87c368d50
2 files changed