/cts/common/device-side/util/src/com/android/compatibility/common/util/ |
D | BatteryUtils.java | 19 import static com.android.compatibility.common.util.TestUtils.waitUntil; 63 waitUntil("Battery saver still off", () -> getPowerManager().isPowerSaveMode()); in enableBatterySaver() 64 waitUntil("Location mode still " + getPowerManager().getLocationPowerSaveMode(), in enableBatterySaver() 69 waitUntil("Force all apps standby still off", in enableBatterySaver() 76 waitUntil("Battery saver still on", () -> !getPowerManager().isPowerSaveMode()); in enableBatterySaver() 77 waitUntil("Location mode still " + getPowerManager().getLocationPowerSaveMode(), in enableBatterySaver() 82 waitUntil("Force all apps standby still on", in enableBatterySaver() 97 waitUntil("Device still not interactive", () -> getPowerManager().isInteractive()); in turnOnScreen() 101 waitUntil("Device still interactive", () -> !getPowerManager().isInteractive()); in turnOnScreen()
|
D | TestUtils.java | 50 public static void waitUntil(String message, BooleanSupplierWithThrow predicate) in waitUntil() method in TestUtils 52 waitUntil(message, 0, predicate); in waitUntil() 58 public static void waitUntil( in waitUntil() method in TestUtils
|
D | AmUtils.java | 43 TestUtils.waitUntil("package process was not killed:" + packageName, in runKill()
|
/cts/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/ |
D | AudioRestrictionTest.java | 61 waitUntil(false, mCheckIfMasterVolumeMuted); in testDisallowAdjustVolume_muted() 67 waitUntil(true, mCheckIfMasterVolumeMuted); in testDisallowAdjustVolume_muted() 92 waitUntil(true, mCheckIfMasterVolumeMuted); in testDisallowAdjustVolume() 101 waitUntil(false, mCheckIfMasterVolumeMuted); in testDisallowAdjustVolume() 105 waitUntil(2, new Callable<Integer>() { in testDisallowAdjustVolume() 115 waitUntil(false, mCheckIfMasterVolumeMuted); in testDisallowAdjustVolume() 131 waitUntil(true, new Callable<Boolean>() { in testDisallowUnmuteMicrophone() 144 waitUntil(false, new Callable<Boolean>() { in testDisallowUnmuteMicrophone() 153 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/ |
D | BatterySaverLocationTest.java | 25 import static com.android.compatibility.common.util.TestUtils.waitUntil; 111 waitUntil("Kill switch still off", () -> getLocationGlobalKillSwitch() == 1); in testLocationAllDisabled() 119 waitUntil("Kill switch still off", () -> getLocationGlobalKillSwitch() == 0); in testLocationAllDisabled() 127 waitUntil("Kill switch still off", () -> getLocationGlobalKillSwitch() == 1); in testLocationAllDisabled() 135 waitUntil("Kill switch still on", () -> getLocationGlobalKillSwitch() == 0); in testLocationAllDisabled()
|
D | BatterySavingTestBase.java | 22 import static com.android.compatibility.common.util.TestUtils.waitUntil; 93 waitUntil("Force all apps standby still " + !expected + " (alarm)", () -> in waitUntilAlarmForceAppStandby() 98 waitUntil("Force all apps standby still " + !expected + " (job)", () -> in waitUntilJobForceAppStandby() 104 waitUntil("Force background check still " + !expected + " (job)", () -> in waitUntilForceBackgroundCheck()
|
D | BatterySaverBgServiceTest.java | 25 import static com.android.compatibility.common.util.TestUtils.waitUntil; 140 waitUntil("Service didn't start", () -> { in waitForLastIntentAction()
|
D | BatterySaverAlarmTest.java | 26 import static com.android.compatibility.common.util.TestUtils.waitUntil; 257 waitUntil("Alarm should fire for an FG app", in testAlarmsThrottled() 278 waitUntil("Allow-while-idle alarm should be blocked in battery saver", in testAlarmsThrottled()
|
/cts/tests/app/src/android/app/cts/android/app/cts/tools/ |
D | WatchUidRunner.java | 133 long waitUntil = SystemClock.uptimeMillis() + timeout; in expect() local 134 String[] line = waitForNextLine(waitUntil, cmd, procState); in expect() 157 long waitUntil = SystemClock.uptimeMillis() + timeout; in waitFor() local 159 String[] line = waitForNextLine(waitUntil, cmd, procState); in waitFor() 192 String[] waitForNextLine(long waitUntil, int cmd, String procState) { in waitForNextLine() argument 197 if (now >= waitUntil) { in waitForNextLine() 204 mPendingLines.wait(waitUntil - now); in waitForNextLine()
|
/cts/tests/tests/syncmanager/src/android/content/syncmanager/cts/ |
D | CtsSyncManagerTest.java | 138 private void waitUntil(String message, BooleanSupplierWithThrow predicate) throws Exception { in waitUntil() method in CtsSyncManagerTest 139 TestUtils.waitUntil(message, TIMEOUT_MS, predicate); in waitUntil() 150 waitUntil("Dumpsys still mentions " + ACCOUNT_1_A, in removeAllAccounts() 167 waitUntil("Syncable isn't initialized", in addAccountAndLetInitialSyncRun() 170 waitUntil("Periodic sync should set up", in addAccountAndLetInitialSyncRun() 227 waitUntil("Should retry more than 3 times.", () -> { in testSoftErrorRetriesActiveApp()
|
/cts/tests/tests/syncmanager/apps/app1/src/android/content/syncmanager/cts/app/ |
D | SyncManagerCtsAuthenticator.java | 18 import static com.android.compatibility.common.util.TestUtils.waitUntil; 90 waitUntil("Accounts still exist.", in removeAllAccounts()
|
/cts/tests/tests/shortcutmanager/src/android/content/pm/cts/shortcutmanager/ |
D | ShortcutManagerSpoofingTest.java | 26 import static com.android.server.pm.shortcutmanagertest.ShortcutManagerTestUtils.waitUntil; 113 waitUntil("Launcher 2 didn't receive message", () -> in testSpoofingLauncher()
|
/cts/tests/AlarmManager/src/android/alarmmanager/cts/ |
D | AppStandbyTests.java | 304 assertTrue("Battery could not be unplugged", waitUntil(() -> !bm.isCharging(), 5_000)); in setBatteryCharging() 315 final boolean success = waitUntil(() -> (mAlarmCount.get() == numAlarms), DEFAULT_WAIT); in waitForAlarms() 320 private boolean waitUntil(Condition condition, long timeout) throws InterruptedException { in waitUntil() method in AppStandbyTests
|
/cts/tests/app/src/android/app/cts/ |
D | ActivityManagerProcessStateTest.java | 134 long waitUntil = SystemClock.elapsedRealtime() + waitTime; in waitForAppFocus() local 145 if (SystemClock.elapsedRealtime() > waitUntil) { in waitForAppFocus()
|