diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-04-16 20:45:18 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2023-04-16 20:45:18 +0000 |
commit | d0efd9a3d8caefd32a28491ffb153fa86c3b51a8 (patch) | |
tree | c29008081e2a2707d33c2b4165df184affb17f7f | |
parent | d25c924376380971466d3334dd97bc28da39c00b (diff) | |
parent | ab12fbd47af8c019007cc740dcca875b017a1907 (diff) | |
download | cts-d0efd9a3d8caefd32a28491ffb153fa86c3b51a8.tar.gz |
Merge "Snap for 9948547 from 66866311005f9cb0d1e8058027af831cb6da0005 to android13-tests-release" into android13-tests-releaseandroid-vts-13.0_r4
-rw-r--r-- | hostsidetests/appsecurity/src/android/appsecurity/cts/Utils.java | 6 | ||||
-rw-r--r-- | tests/framework/base/windowmanager/src/android/server/wm/WindowInsetsControllerTests.java | 7 |
2 files changed, 11 insertions, 2 deletions
diff --git a/hostsidetests/appsecurity/src/android/appsecurity/cts/Utils.java b/hostsidetests/appsecurity/src/android/appsecurity/cts/Utils.java index 30ed7bf9488..ff85f56d0f8 100644 --- a/hostsidetests/appsecurity/src/android/appsecurity/cts/Utils.java +++ b/hostsidetests/appsecurity/src/android/appsecurity/cts/Utils.java @@ -16,6 +16,7 @@ package android.appsecurity.cts; +import com.android.tradefed.util.RunUtil; import com.android.ddmlib.AdbCommandRejectedException; import com.android.ddmlib.CollectingOutputReceiver; import com.android.ddmlib.Log; @@ -182,11 +183,12 @@ public class Utils { Log.d(LOG_TAG, "Yay, system is ready!"); // or is it really ready? // guard against potential USB mode switch weirdness at boot - Thread.sleep(10 * 1000); + RunUtil.getDefault().sleep(10 * 1000); return; } Log.d(LOG_TAG, "Waiting for system ready..."); - Thread.sleep(1000); + // For low performance devices + RunUtil.getDefault().sleep(10 * 1000); } throw new AssertionError("System failed to become ready!"); } diff --git a/tests/framework/base/windowmanager/src/android/server/wm/WindowInsetsControllerTests.java b/tests/framework/base/windowmanager/src/android/server/wm/WindowInsetsControllerTests.java index 4a76d928c9d..9d1f3629d59 100644 --- a/tests/framework/base/windowmanager/src/android/server/wm/WindowInsetsControllerTests.java +++ b/tests/framework/base/windowmanager/src/android/server/wm/WindowInsetsControllerTests.java @@ -416,6 +416,11 @@ public class WindowInsetsControllerTests extends WindowManagerTestBase { final TestActivity activity = startActivity(TestActivity.class); final View controlTarget = activity.getWindow().getDecorView(); + + // Assume we have at least one visible system bar. + assumeTrue(controlTarget.getRootWindowInsets().isVisible(statusBars()) || + controlTarget.getRootWindowInsets().isVisible(navigationBars())); + final int[] targetSysUiVis = new int[1]; final View nonControlTarget = new View(mTargetContext); final int[] nonTargetSysUiVis = new int[1]; @@ -743,6 +748,8 @@ public class WindowInsetsControllerTests extends WindowManagerTestBase { @Test public void testDispatchApplyWindowInsetsCount_systemBars() throws InterruptedException { + assumeFalse(isCar() && remoteInsetsControllerControlsSystemBars()); + final TestActivity activity = startActivityInWindowingModeFullScreen(TestActivity.class); final View rootView = activity.getWindow().getDecorView(); getInstrumentation().waitForIdleSync(); |