[res] Fix OverlayManagerPerfTest
The test was implemented in a really flaky way:
- It didn't wait for the overlay disablement propagation
correctly, making the setEnabled() tests measure the
phase of the Moon. Now the test is more reliable, but
unfortunately it also depends on the broadcast delivery
timings and activity restarts and redraws, so I doubt there's
a way to make it that much more precise.
- It installed some APKs that Play Protect doesn't see often
and brings up a popup asking to upload them for scanning,
and the popup default timeout is 1hr *per APK*.
Now the timeout is 10s and the installation happens in
parallel, making the whole wait to be about 10-20s
Test: atest OverlayManagerPerfTest
Flag: EXEMPT tests-only change
Change-Id: Iac9f85866cc0dbdc1b567ac599a92b2fd8998932
2 files changed