Wait for both window and layer to be visible and window to be pinned before considering the app in pip mode

Bug: 277761298
Test: atest WMShellFlickerTests
Change-Id: I2334a7bb8eecc9542f5201f5c8aff8457d26459f
This commit is contained in:
Nataniel Borges
2023-04-20 16:20:27 +00:00
parent 0f4533372b
commit 2c6492d62b

View File

@@ -250,7 +250,10 @@ open class PipAppHelper(instrumentation: Instrumentation) :
waitConditions = arrayOf(ConditionsFactory.hasPipWindow())
)
wmHelper.StateSyncBuilder().withPipShown().waitForAndVerify()
wmHelper.StateSyncBuilder()
.withWindowSurfaceAppeared(this)
.withPipShown()
.waitForAndVerify()
}
/** Expand the PIP window back to full screen via intent and wait until the app is visible */