Fix testLaunchPipActivity flakiness

Starting PIP mode is not synchronous, which caused flakiness of test.
This CL adds wait for UI thread to become idle.

Bug: 28119799
Change-Id: Ic4269a7feb509dfcba5690864eef913f34f5732f
1 file changed