Fix flaky TabHost_TabSpecTest#testSetContent3 CTS test
This test is consistently flaky, failing about 10% of cloud tests (consistently
passing on actual device tests).
The problem seems to be a race condition between when an intent is launched (by
going to a particular tab) compared with when the Instrumentation object is setup
to watch for that activity launch.
The fix is to set up instrumentation before the code that puts the tab-set operation
onto the UI thread; that way, the instrumentation logic will fire regardless of when
the UI thread code actually runs.
Test: This is the test
Bug: 110535300
Bug: 146592430
Change-Id: I5a712a1a7396e1cb9bd130fa10219f538798f444
(cherry picked from commit 2c61cbc9e89bd3e889f2d2da315762d5d27f2436)
1 file changed