Suppress app transition while recents is running
This fixes conflict between app transition and recents animation in the
following scenario.
1) App transition animation finishes after app closing animation, which
is controlled by recents, finishes.
During the app closing animation, recents makes the closing app surface
invisible, but app transition animation overrides it to visible again.
This causes a flicker.
2) App transition starts during recents animation.
This can happen when a user launches an activity, and immediately after
that, swipes up the screen to close the app.
While recents is running, we assume animation on tasks is controlled by
recents, and visibility is commited without animation after recents
animation finishes. However starting app transition during recents
breaks this assumption, which ends up with playing one more unexpected
closing animation (so users see closing animation twice).
Bug: 223499269
Test: atest AppTransitionTest + manual
1. Launch Gmail app
2. Click icon on the bottom tab (e.g. Chat)
3. Swipe up from the bottom (immediately after step 2)
4. Verify closing animation only plays once
Change-Id: Id0a8b472b9a3d7cf5b55852de83cbd50b985b834
5 files changed