Allow the window to be recreated in the middle of a test
On ARC++ devices, some of the dEQP CTS tests were occasionally failing on
devices running in tablet mode, due to the timing of a WM relayout that
happens shortly after the orientation change is realized.
We traced it back to the dEQP test harness always expecting to see a
call from the system to onNativeWindowResized() after a call to
oNNativeWindowCreated(). It happened that the relayout on ARC++ devices
was not causing a size change, so this message was never received.
The result was that the test paused itself, and never completed. The
watchdog thread that the test harness creates ended up killing and
failing the test.
This patch adjusts the logic so that the activity only waits to process
the window creation for the very first call to onNativeWindowResized(),
as when the activity is first created that call is indeed made (but note
not really guaranteed). A subsequent call to onNativeWindowCreated()
will unpause the test (setting the READY state), as well as finish
processing the window creation.
Bug:
74371892
Test: dEQP-GLES3.functional.prerequisite#clear_color
Change-Id: I3c429aea272cbfee3f150a32c12233c9f38a7936