AML: Wait for a stable state to execute non-cold launch

The waitForDeviceIdle assumes idle if there is no new accessibility
event within 500ms, that may not be able to match an expected state
in a slow testing environment.

Bug: 143855645
Test: atest ActivityMetricsLoggerTests# \
            testAppHotLaunchSetsWaitResultDelayData
            testAppWarmLaunchSetsWaitResultDelayData

Change-Id: Ic60f3e732d4914fb44eb3849523fbdbce9200ca9
1 file changed