Fix activity & window manager tests on emulator

bug: 31647943

Most of those are timing issues. The tests rely on executing
activity manager commands in a certain sequence, but sending
a command before the previous one finishes seems to affect the
outcome. For example: attempting to launch TestActivity from
LaunchToSideActivity *before* the latter becomes visible will
fail.

Change-Id: I2cbee39b724524169f753624b91b5093e610aff5
2 files changed