From 2c6492d62b6e9bb6d452affe1756e6bb57427922 Mon Sep 17 00:00:00 2001 From: Nataniel Borges Date: Thu, 20 Apr 2023 16:20:27 +0000 Subject: [PATCH] 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 --- .../com/android/server/wm/flicker/helpers/PipAppHelper.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/FlickerTests/src/com/android/server/wm/flicker/helpers/PipAppHelper.kt b/tests/FlickerTests/src/com/android/server/wm/flicker/helpers/PipAppHelper.kt index a72c12dcb4632..c5a21a80d8d07 100644 --- a/tests/FlickerTests/src/com/android/server/wm/flicker/helpers/PipAppHelper.kt +++ b/tests/FlickerTests/src/com/android/server/wm/flicker/helpers/PipAppHelper.kt @@ -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 */