Fix the regression that closing transition disappeared.
For hierarchical animation, there are missing some handling
around mNeedsZBoost, when closing an activity the transition did
not applied.
1. Move some codes around mNeedsZBoost from ActivityRecord to
WindowContainer so Task can also benefit from it.
2. TaskDisplayArea#assignChildLayers should combined needsZBoost
so this attribute can apply on root task.
3. If next top activity will move to top in #finishIfPossible
and the finishing activity is on top, provide it a higher layer
to remain on top. Otherwise user will see flicker because the
transition need to be applied until next activity resumed.
Bug: 159200318
Test: atest ActivityRecordTests TaskDisplayAreaTests
AppWindowTokenAnimationTests TransitionSelectionTests
Change-Id: I85ec3307b31444e09179abca30298af2ce538834
3 files changed