Check animating accurately when assigning mAnimatingExit from relayout

Otherwise if the window is animating with type which won't report to
WindowState#onExitAnimationDone (e.g. ANIMATION_TYPE_FIXED_TRANSFORM),
the window will keep mAnimatingExit=true and visible logically. The
condition from relayout now is aligned with WS#removeIfPossible.

Also polish a case when launching app from notification with orientation
change. The notification shade may animate collapsing panel so it should
not be faded out.

Fixes: 185554529
Test: DisplayContentTests#testApplyTopFixedRotationTransform
Change-Id: I02943e37869bb2757ad38440fe281cf19b4ceec9
4 files changed