Wait for HeavyWeightSwitcherActivity to be shown

Because syncInputTransactions only takes effect if there is an
animation, if HeavyWeightSwitcherActivity is not drawn fast enough
to trigger the animation, it doesn't really wait for something.
Then the following maybeClick may still click on a temporal position
which isn't the actual position of the target button.

Fix: 239638704
Test: ActivityManagerProcessStateTest#testCantSaveStateLaunchAndSwitch
Change-Id: I7c48f4688a7e43e3d1c95292c318d9f9e7167bd4
(cherry picked from commit e7ed67acde7f98ef1de38977f3835c6bcf9704cb)
Merged-In: I7c48f4688a7e43e3d1c95292c318d9f9e7167bd4
1 file changed