Home
last modified time | relevance | path

Searched refs:waitUntil (Results 1 – 25 of 27) sorted by relevance

12

/cts/common/device-side/util/src/com/android/compatibility/common/util/
DBatteryUtils.java19 import static com.android.compatibility.common.util.TestUtils.waitUntil;
84 waitUntil("Battery saver still off", () -> getPowerManager().isPowerSaveMode()); in enableBatterySaver()
85 waitUntil("Location mode still " + getPowerManager().getLocationPowerSaveMode(), in enableBatterySaver()
90 waitUntil("Force all apps standby still off", in enableBatterySaver()
98 waitUntil("Battery saver still on", () -> !getPowerManager().isPowerSaveMode()); in enableBatterySaver()
99 waitUntil("Location mode still " + getPowerManager().getLocationPowerSaveMode(), in enableBatterySaver()
104 waitUntil("Force all apps standby still on", in enableBatterySaver()
119 waitUntil("Device still not interactive", () -> getPowerManager().isInteractive()); in turnOnScreen()
123 waitUntil("Device still interactive", () -> !getPowerManager().isInteractive()); in turnOnScreen()
DTestUtils.java52 public static void waitUntil(String message, BooleanSupplierWithThrow predicate) in waitUntil() method in TestUtils
54 waitUntil(message, 0, predicate); in waitUntil()
60 public static void waitUntil( in waitUntil() method in TestUtils
DAmUtils.java43 TestUtils.waitUntil("package process was not killed:" + packageName, in runKill()
/cts/common/device-side/util-axt/src/com/android/compatibility/common/util/
DBatteryUtils.java19 import static com.android.compatibility.common.util.TestUtils.waitUntil;
87 waitUntil("Battery saver still off", () -> getPowerManager().isPowerSaveMode()); in enableBatterySaver()
88 waitUntil("Location mode still " + getPowerManager().getLocationPowerSaveMode(), in enableBatterySaver()
93 waitUntil("Force all apps standby still off", in enableBatterySaver()
101 waitUntil("Battery saver still on", () -> !getPowerManager().isPowerSaveMode()); in enableBatterySaver()
102 waitUntil("Location mode still " + getPowerManager().getLocationPowerSaveMode(), in enableBatterySaver()
107 waitUntil("Force all apps standby still on", in enableBatterySaver()
122 waitUntil("Device still not interactive", () -> getPowerManager().isInteractive()); in turnOnScreen()
126 waitUntil("Device still interactive", () -> !getPowerManager().isInteractive()); in turnOnScreen()
DTestUtils.java52 public static void waitUntil(String message, BooleanSupplierWithThrow predicate) in waitUntil() method in TestUtils
54 waitUntil(message, 0, predicate); in waitUntil()
60 public static void waitUntil( in waitUntil() method in TestUtils
DAmUtils.java45 TestUtils.waitUntil("package process was not killed:" + packageName, in runKill()
/cts/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/
DAudioRestrictionTest.java72 waitUntil(false, mCheckIfMasterVolumeMuted); in testDisallowAdjustVolume_muted()
78 waitUntil(true, mCheckIfMasterVolumeMuted); in testDisallowAdjustVolume_muted()
112 waitUntil(true, mCheckIfMasterVolumeMuted); in testDisallowAdjustVolume()
121 waitUntil(false, mCheckIfMasterVolumeMuted); in testDisallowAdjustVolume()
125 waitUntil(2, new Callable<Integer>() { in testDisallowAdjustVolume()
135 waitUntil(false, mCheckIfMasterVolumeMuted); in testDisallowAdjustVolume()
158 waitUntil(true, new Callable<Boolean>() { in testDisallowUnmuteMicrophone()
171 waitUntil(false, new Callable<Boolean>() { in testDisallowUnmuteMicrophone()
180 private <T> void waitUntil(T expected, Callable<T> c) throws Exception { in waitUntil() method in AudioRestrictionTest
/cts/tests/tests/batterysaving/src/android/os/cts/batterysaving/
DBatterySaverLocationTest.java25 import static com.android.compatibility.common.util.TestUtils.waitUntil;
185 waitUntil("Kill switch still off", () -> getLocationGlobalKillSwitch() == 1); in testLocationAllDisabled()
193 waitUntil("Kill switch still off", () -> getLocationGlobalKillSwitch() == 0); in testLocationAllDisabled()
201 waitUntil("Kill switch still off", () -> getLocationGlobalKillSwitch() == 1); in testLocationAllDisabled()
209 waitUntil("Kill switch still on", () -> getLocationGlobalKillSwitch() == 0); in testLocationAllDisabled()
307 waitUntil("Normal location request still sent to provider", in testLocationRequestThrottling()
314 waitUntil("Normal location request not sent to provider", in testLocationRequestThrottling()
321 waitUntil("Normal location request still sent to provider", in testLocationRequestThrottling()
329 waitUntil("Normal location request not sent to provider", in testLocationRequestThrottling()
DBatterySavingTestBase.java23 import static com.android.compatibility.common.util.TestUtils.waitUntil;
95 waitUntil("Force all apps standby still " + !expected + " (alarm)", () -> in waitUntilAlarmForceAppStandby()
100 waitUntil("Force all apps standby still " + !expected + " (job)", () -> in waitUntilJobForceAppStandby()
106 waitUntil("Force background check still " + !expected + " (job)", () -> in waitUntilForceBackgroundCheck()
DBatterySaverAlarmTest.java26 import static com.android.compatibility.common.util.TestUtils.waitUntil;
289 waitUntil("Alarm should fire for an FG app", in testAlarmsThrottled()
311 waitUntil("Allow-while-idle alarm should be blocked in battery saver", in testAlarmsThrottled()
DBatterySaverBgServiceTest.java25 import static com.android.compatibility.common.util.TestUtils.waitUntil;
141 waitUntil("Service didn't start", () -> { in waitForLastIntentAction()
/cts/tests/app/src/android/app/cts/android/app/cts/tools/
DWatchUidRunner.java135 long waitUntil = SystemClock.uptimeMillis() + timeout; in expect() local
136 String[] line = waitForNextLine(waitUntil, cmd, procState); in expect()
159 long waitUntil = SystemClock.uptimeMillis() + timeout; in waitFor() local
161 String[] line = waitForNextLine(waitUntil, cmd, procState); in waitFor()
194 String[] waitForNextLine(long waitUntil, int cmd, String procState) { in waitForNextLine() argument
199 if (now >= waitUntil) { in waitForNextLine()
206 mPendingLines.wait(waitUntil - now); in waitForNextLine()
/cts/tests/tests/syncmanager/src/android/content/syncmanager/cts/
DCtsSyncManagerTest.java139 private void waitUntil(String message, BooleanSupplierWithThrow predicate) throws Exception { in waitUntil() method in CtsSyncManagerTest
140 TestUtils.waitUntil(message, TIMEOUT_MS, predicate); in waitUntil()
151 waitUntil("Dumpsys still mentions " + ACCOUNT_1_A, in removeAllAccounts()
168 waitUntil("Syncable isn't initialized", in addAccountAndLetInitialSyncRun()
171 waitUntil("Periodic sync should set up", in addAccountAndLetInitialSyncRun()
228 waitUntil("Should retry more than 3 times.", () -> { in testSoftErrorRetriesActiveApp()
/cts/tests/framework/base/windowmanager/src/android/server/wm/
DMultiDisplaySecurityTests.java745 TestUtils.waitUntil("Waiting for system decoration flag to be set", in testSettingFlagWithoutInternalSystemPermission()
760 TestUtils.waitUntil("Waiting for show IME flag to be set", in testSettingFlagWithoutInternalSystemPermission()
818 TestUtils.waitUntil("Waiting for system decoration flag to be set", in testSettingFlagToUntrustedDisplay()
836 TestUtils.waitUntil("Waiting for show IME flag to be set", in testSettingFlagToUntrustedDisplay()
888 TestUtils.waitUntil("Waiting for system decoration flag to be set", in testSettingFlagToTrustedDisplay()
896 TestUtils.waitUntil("Waiting for system decoration flag to be set", in testSettingFlagToTrustedDisplay()
909 TestUtils.waitUntil("Waiting for show IME flag to be set", in testSettingFlagToTrustedDisplay()
917 TestUtils.waitUntil("Waiting for show IME flag to be set", in testSettingFlagToTrustedDisplay()
DMultiDisplayTestBase.java537 TestUtils.waitUntil("Waiting for display show system decors", in configureDisplays()
544 TestUtils.waitUntil("Waiting for display show Ime", in configureDisplays()
558 TestUtils.waitUntil("Waiting for the show IME flag to be set", in restoreDisplayStates()
/cts/tests/tests/shortcutmanager/src/android/content/pm/cts/shortcutmanager/
DShortcutManagerSpoofingTest.java26 import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.waitUntil;
113 waitUntil("Launcher 2 didn't receive message", () -> in testSpoofingLauncher()
/cts/tests/tests/syncmanager/apps/app1/src/android/content/syncmanager/cts/app/
DSyncManagerCtsAuthenticator.java18 import static com.android.compatibility.common.util.TestUtils.waitUntil;
90 waitUntil("Accounts still exist.", in removeAllAccounts()
/cts/hostsidetests/backup/src/android/cts/backup/
DMultiUserBackupStateTest.java83 HostSideTestUtils.waitUntil("wait for backup to be deactivated for removed user", in testBackupDeactivatedWhenUserIsRemoved()
DBaseMultiUserBackupHostSideTest.java147 HostSideTestUtils.waitUntil("wait for user to have local transport", in switchUserToLocalTransportAndAssertSuccess()
/cts/tests/AlarmManager/src/android/alarmmanager/cts/
DAppStandbyTests.java492 assertTrue("Battery could not be unplugged", waitUntil(() -> !bm.isCharging(), 5_000)); in setBatteryCharging()
503 final boolean success = waitUntil(() -> (mAlarmCount.get() == 1), DEFAULT_WAIT); in waitForAlarm()
508 private boolean waitUntil(Condition condition, long timeout) throws InterruptedException { in waitUntil() method in AppStandbyTests
/cts/hostsidetests/userspacereboot/testapps/BootCompletedTestApp/src/com/android/cts/userspacereboot/bootcompleted/
DBootCompletedUserspaceRebootTest.java102 TestUtils.waitUntil( in waitForBroadcast()
/cts/hostsidetests/backup/SyncAdapterSettingsApp/src/android/cts/backup/syncadaptersettingsapp/
DSyncAdapterSettingsTest.java253 TestUtils.waitUntil("Timeout waiting for authenticator to be registered", in waitUntilAuthenticatorRegistered()
/cts/tests/tests/contactsproviderwipe/src/android/provider/cts/contactsproviderwipe/
DContactsContract_Wipe.java145 TestUtils.waitUntil("CP2 still not ready", () -> { in wipeContactsProvider()
/cts/tests/tests/role/src/android/app/role/cts/
DRoleManagerTest.java422 TestUtils.waitUntil("App is not set as default dialer app", () -> Objects.equals( in targetSdk28AndChangeDefaultDialerAndAllowThenIsDefaultDialer()
436 TestUtils.waitUntil("App is not set as default sms app", () -> Objects.equals( in targetSdk28AndChangeDefaultSmsAndAllowThenIsDefaultSms()
/cts/tests/tests/app.usage/src/android/app/usage/cts/
DUsageReportingTest.java363 TestUtils.waitUntil(failMessage, ASSERT_TIMEOUT_SECONDS, () -> { in assertAppOrTokenUsed()

12