Refine FilesAppPerfTest to improve consistency
1. Query package name by intent rather than hardcoded. Otherwise
the force-stop may not kill the target app.
It is expected that metric files-cold-start-performance-median
will increase, because it was warm-start (only provider is killed).
2. Change from looping "-> launcher activity -> target activity" to
only "-> target activity", to eliminate uninterested factors from
transition between home.
3. Wait until the removal of previous target activity is completed
to start next iteration. So the metrics could be stabler by
focusing on measuring the launch flow.
4. Remove waitForIdle to avoid non deterministic waiting according
to accessibility event. It usually means UI interaction is idle
but not the app is idle.
This can also reduce test execution time by more than 70%, e.g.
warm-start 40s to 9s.
Bug: 258902050
Bug: 266684779
Test: atest FilesAppPerfTest
Change-Id: I8da0050105f02e3ba405b4b3184f56450befd358
3 files changed