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
Bug: 301368031
Test: ActivityManagerProcessStateTest#testCantSaveStateLaunchAndSwitch
Change-Id: I7c48f4688a7e43e3d1c95292c318d9f9e7167bd4
Merged-In: I7c48f4688a7e43e3d1c95292c318d9f9e7167bd4
2 files changed