Wait for animation in testCantSaveStateLaunchAndSwitch

Otherwise "maybeClick(device, new UiSelector().resourceId("..."))"
may get the bounds outside of screen, then the input event will be
dropped so HeavyWeightSwitcherActivity is not dismissed and the
test fails because the expected next activity isn't focused.

Bug: 240942465
Bug: 233822306
Test: Make the animation slower to increase the timing issue:
 adb shell settings put global transition_animation_scale 3
 adb shell settings put global animator_duration_scale 3
 adb shell settings put global window_animation_scale 3
 Then run:
 atest ActivityManagerProcessStateTest#testCantSaveStateLaunchAndSwitch
Change-Id: I5287f93b1370fa6e1506ede6d0a2151595d33701
1 file changed