Fix testTurnScreenOnSingleTask flaky.

In gce-presubmit-am "no-retries" tests, found testTurnScreenOnSingleTask
when resume single task activity after screen on, we cannot guarantee
the display state change will be done right after activity visible since
display state change is from another async thread.

Calling waitForDefaultDisplayState to wait for expected display state
to fix timing case.

Bug: 113638150
Test: atest ActivityManagerActivityVisibilityTests#testTurnScreenOnSingleTask
       to test 100 times without fail.

Change-Id: I4be748c624c2e30b871aadf058f2b4d119277440
Merged-In: I4be748c624c2e30b871aadf058f2b4d119277440
(cherry picked from commit 9ac763316d1717708e3dd1058f6b3c8bf98fc305)
1 file changed