Attempts fixing test flakiness

There is a race condition between the test and the launched
activity, which could result in NullPointerException and
break the test.

Bug: 289865322
Test: atest ActivityThreadTest over 500 times on cf
Change-Id: I1e13c9c1dd796296263de0984675311866ba61f3
1 file changed