Loading services/tests/wmtests/src/com/android/server/wm/ScreenshotTests.java +3 −2 Original line number Diff line number Diff line Loading @@ -66,6 +66,7 @@ import org.junit.Rule; import org.junit.Test; import org.junit.rules.TestName; import java.time.Duration; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; Loading Loading @@ -131,7 +132,7 @@ public class ScreenshotTests { assertTrue("Failed to wait for transaction to get committed", countDownLatch.await(WAIT_TIME_S, TimeUnit.SECONDS)); assertTrue("Failed to wait for stable geometry", waitForStableWindowGeometry(WAIT_TIME_S, TimeUnit.SECONDS)); waitForStableWindowGeometry(Duration.ofSeconds(WAIT_TIME_S))); ScreenCapture.LayerCaptureArgs args = new ScreenCapture.LayerCaptureArgs.Builder(secureSC) .setCaptureSecureLayers(true) Loading Loading @@ -212,7 +213,7 @@ public class ScreenshotTests { assertTrue("Failed to wait for transaction to get committed", countDownLatch.await(WAIT_TIME_S, TimeUnit.SECONDS)); assertTrue("Failed to wait for stable geometry", waitForStableWindowGeometry(WAIT_TIME_S, TimeUnit.SECONDS)); waitForStableWindowGeometry(Duration.ofSeconds(WAIT_TIME_S))); ScreenshotHardwareBuffer[] screenCapture = new ScreenshotHardwareBuffer[1]; Bitmap screenshot = null; Loading services/tests/wmtests/src/com/android/server/wm/TrustedOverlayTests.java +3 −2 Original line number Diff line number Diff line Loading @@ -49,6 +49,7 @@ import org.junit.Rule; import org.junit.Test; import org.junit.rules.TestName; import java.time.Duration; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; Loading Loading @@ -144,7 +145,7 @@ public class TrustedOverlayTests { } } return false; }, TIMEOUT_S, TimeUnit.SECONDS); }, Duration.ofSeconds(TIMEOUT_S)); assertAndDumpWindowState(TAG, "Failed to find window or was not marked trusted", foundTrusted[0]); Loading Loading @@ -209,7 +210,7 @@ public class TrustedOverlayTests { } } return foundTrusted[0] && foundTrusted[1]; }, TIMEOUT_S, TimeUnit.SECONDS); }, Duration.ofSeconds(TIMEOUT_S)); if (!foundTrusted[0] || !foundTrusted[1]) { CtsWindowInfoUtils.dumpWindowsOnScreen(TAG, mName.getMethodName()); Loading tests/Input/src/com/android/test/input/AnrTest.kt +2 −2 Original line number Diff line number Diff line Loading @@ -40,7 +40,7 @@ import androidx.test.uiautomator.Until import com.android.cts.input.DebugInputRule import com.android.cts.input.UinputTouchScreen import java.util.concurrent.TimeUnit import java.time.Duration import org.junit.After import org.junit.Assert.assertEquals Loading Loading @@ -193,6 +193,6 @@ class AnrTest { val flags = " -W -n " val startCmd = "am start $flags $PACKAGE_NAME/.UnresponsiveGestureMonitorActivity" instrumentation.uiAutomation.executeShellCommand(startCmd) waitForStableWindowGeometry(5L, TimeUnit.SECONDS) waitForStableWindowGeometry(Duration.ofSeconds(5)) } } Loading
services/tests/wmtests/src/com/android/server/wm/ScreenshotTests.java +3 −2 Original line number Diff line number Diff line Loading @@ -66,6 +66,7 @@ import org.junit.Rule; import org.junit.Test; import org.junit.rules.TestName; import java.time.Duration; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; Loading Loading @@ -131,7 +132,7 @@ public class ScreenshotTests { assertTrue("Failed to wait for transaction to get committed", countDownLatch.await(WAIT_TIME_S, TimeUnit.SECONDS)); assertTrue("Failed to wait for stable geometry", waitForStableWindowGeometry(WAIT_TIME_S, TimeUnit.SECONDS)); waitForStableWindowGeometry(Duration.ofSeconds(WAIT_TIME_S))); ScreenCapture.LayerCaptureArgs args = new ScreenCapture.LayerCaptureArgs.Builder(secureSC) .setCaptureSecureLayers(true) Loading Loading @@ -212,7 +213,7 @@ public class ScreenshotTests { assertTrue("Failed to wait for transaction to get committed", countDownLatch.await(WAIT_TIME_S, TimeUnit.SECONDS)); assertTrue("Failed to wait for stable geometry", waitForStableWindowGeometry(WAIT_TIME_S, TimeUnit.SECONDS)); waitForStableWindowGeometry(Duration.ofSeconds(WAIT_TIME_S))); ScreenshotHardwareBuffer[] screenCapture = new ScreenshotHardwareBuffer[1]; Bitmap screenshot = null; Loading
services/tests/wmtests/src/com/android/server/wm/TrustedOverlayTests.java +3 −2 Original line number Diff line number Diff line Loading @@ -49,6 +49,7 @@ import org.junit.Rule; import org.junit.Test; import org.junit.rules.TestName; import java.time.Duration; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; Loading Loading @@ -144,7 +145,7 @@ public class TrustedOverlayTests { } } return false; }, TIMEOUT_S, TimeUnit.SECONDS); }, Duration.ofSeconds(TIMEOUT_S)); assertAndDumpWindowState(TAG, "Failed to find window or was not marked trusted", foundTrusted[0]); Loading Loading @@ -209,7 +210,7 @@ public class TrustedOverlayTests { } } return foundTrusted[0] && foundTrusted[1]; }, TIMEOUT_S, TimeUnit.SECONDS); }, Duration.ofSeconds(TIMEOUT_S)); if (!foundTrusted[0] || !foundTrusted[1]) { CtsWindowInfoUtils.dumpWindowsOnScreen(TAG, mName.getMethodName()); Loading
tests/Input/src/com/android/test/input/AnrTest.kt +2 −2 Original line number Diff line number Diff line Loading @@ -40,7 +40,7 @@ import androidx.test.uiautomator.Until import com.android.cts.input.DebugInputRule import com.android.cts.input.UinputTouchScreen import java.util.concurrent.TimeUnit import java.time.Duration import org.junit.After import org.junit.Assert.assertEquals Loading Loading @@ -193,6 +193,6 @@ class AnrTest { val flags = " -W -n " val startCmd = "am start $flags $PACKAGE_NAME/.UnresponsiveGestureMonitorActivity" instrumentation.uiAutomation.executeShellCommand(startCmd) waitForStableWindowGeometry(5L, TimeUnit.SECONDS) waitForStableWindowGeometry(Duration.ofSeconds(5)) } }