summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Yinchu Chen <chenyc5@motorola.com> 2025-03-13 07:34:22 -0700
committer Samip Garg <samgarg@google.com> 2025-03-19 16:28:11 -0700
commita4f5f21095566bf36516a8e5bce06799ed8a7b59 (patch)
tree95c7c7c838dea4db83ed14d4e68fe749ebf7d762
parentd4da9b56b00f075a894258753d28804e645e5ce6 (diff)
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
-rw-r--r--tests/cts/role/src/android/app/role/cts/RoleManagerTest.java3
1 files changed, 3 insertions, 0 deletions
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)