From a4f5f21095566bf36516a8e5bce06799ed8a7b59 Mon Sep 17 00:00:00 2001 From: Yinchu Chen Date: Thu, 13 Mar 2025 07:34:22 -0700 Subject: add waitForIdle(timeout) test item will turn on the private space mode, and this mode turns on a large number of app operations and multiuser operations, it will be easier for low-end devices to run in complete. Add test waitForIdle(timeout) to make sure time execute finish. Bug: 403200469 Test: android.app.role.cts.RoleManagerTest #openDefaultAppListAndSetDefaultAppThenIsDefaultAppForPrivateSpace Change-Id: I107c5a3e2c9e3fce6f68e6cefba0c6133bd547d0 Merged-In: I107c5a3e2c9e3fce6f68e6cefba0c6133bd547d0 --- tests/cts/role/src/android/app/role/cts/RoleManagerTest.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/cts/role/src/android/app/role/cts/RoleManagerTest.java b/tests/cts/role/src/android/app/role/cts/RoleManagerTest.java index 56f681388..401bc097b 100644 --- a/tests/cts/role/src/android/app/role/cts/RoleManagerTest.java +++ b/tests/cts/role/src/android/app/role/cts/RoleManagerTest.java @@ -856,6 +856,9 @@ public class RoleManagerTest { assertThat(privateProfile).isNotNull(); installPackage(APP_APK_PATH, privateProfile); installPackage(APP_FOR_PROFILE_APK_PATH, privateProfile); + + UiAutomatorUtils.getUiDevice().waitForIdle(30 * 1000); + addRoleHolderAsUser(ROLE_NAME, APP_FOR_PROFILE_PACKAGE_NAME, privateProfile); sContext.startActivity(new Intent(Settings.ACTION_MANAGE_DEFAULT_APPS_SETTINGS) -- cgit v1.2.3-59-g8ed1b