Ensure assertions run only on exit transitions

Because of some changes to the default transitions, the setup before the transition can run is now slightly slower which means that a race condition presents itself fairly often. Some tests in WindowUntrustedTouchTest perform assertions on properties of custom exit animation but open an activity right before leading to the test not always running the assertion on the exit transition if the enter transition doesn't finish fast enough.

Bug: 284145030
Bug: 225916427

Test: atest android.server.wm.WindowUntrustedTouchTest#testLongExitAnimations_areLimited android.server.wm.WindowUntrustedTouchTest#testWhenExitAnimationBelowThreshold_allowsTouch --iterations 50
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:fb9833821c14ce48d42b79927f7ba6cd22d07a42)
Merged-In: Ie0fecd69d51d82ab76a9f38523928b786458b50b
Change-Id: Ie0fecd69d51d82ab76a9f38523928b786458b50b
1 file changed