/cts/tests/autofillservice/src/android/autofillservice/cts/ |
D | TimeoutTest.java | 64 final Timeout timeout = new Timeout(NAME, 1, 2, 5); in testGetters() local 65 assertThat(timeout.ms()).isEqualTo(1); in testGetters() 66 assertFloat(timeout.getMultiplier(), 2); in testGetters() 67 assertThat(timeout.getMaxValue()).isEqualTo(5); in testGetters() 68 assertThat(timeout.getName()).isEqualTo(NAME); in testGetters() 73 final Timeout timeout = new Timeout(NAME, 1, 2, 5); in testIncrease() local 75 assertThat(timeout.increase()).isEqualTo(1); in testIncrease() 76 assertThat(timeout.ms()).isEqualTo(2); in testIncrease() 77 assertThat(timeout.increase()).isEqualTo(2); in testIncrease() 78 assertThat(timeout.ms()).isEqualTo(4); in testIncrease() [all …]
|
D | RetryableException.java | 41 public RetryableException(@Nullable Timeout timeout, String msg) { in RetryableException() argument 43 this.mTimeout = timeout; in RetryableException() 46 public RetryableException(@Nullable Timeout timeout, String format, Object...args) { in RetryableException() argument 48 this.mTimeout = timeout; in RetryableException() 51 public RetryableException(@Nullable Timeout timeout, Throwable cause, String format, in RetryableException() argument 54 this.mTimeout = timeout; in RetryableException()
|
D | RetryRule.java | 60 final Timeout timeout = e.getTimeout(); in apply() 61 if (timeout != null) { in apply() 62 long before = timeout.ms(); in apply() 63 timeout.increase(); in apply() 64 Log.d(TAG, "Increased " + timeout.getName() + " from " + before + "ms" in apply() 65 + " to " + timeout.ms() + "ms"); in apply()
|
D | UiBot.java | 301 public UiObject2 assertShownByText(String text, Timeout timeout) throws Exception { 302 final UiObject2 object = waitForObject(By.text(text), timeout); 364 UiObject2 assertShownByRelativeId(String id, Timeout timeout) throws Exception { 365 final UiObject2 obj = waitForObject(By.res(mPackageName, id), timeout); 376 void assertGoneByRelativeId(String id, Timeout timeout) { 377 boolean gone = mDevice.wait(Until.gone(By.res(mPackageName, id)), timeout.ms()); 380 + timeout + " ms"; 389 private void assertNeverShown(String description, BySelector selector, long timeout) 391 SystemClock.sleep(timeout); 396 description, timeout, getChildrenAsText(object))); [all …]
|
/cts/common/device-side/util/src/com/android/compatibility/common/util/ |
D | PollingCheck.java | 34 public PollingCheck(long timeout) { in PollingCheck() argument 35 mTimeout = timeout; in PollingCheck() 45 long timeout = mTimeout; in run() local 46 while (timeout > 0) { in run() 57 timeout -= TIME_SLICE; in run() 63 public static void check(CharSequence message, long timeout, Callable<Boolean> condition) in check() argument 65 while (timeout > 0) { in check() 71 timeout -= TIME_SLICE; in check() 86 public static void waitFor(long timeout, final PollingCheckCondition condition) { in waitFor() argument 87 new PollingCheck(timeout) { in waitFor() argument
|
D | Within.java | 38 public Within(long timeout) { in Within() argument 39 mTimeout = timeout; in Within() 44 long timeout = mTimeout; in verify() local 48 while (timeout > 0) { in verify() 66 timeout -= TIME_SLICE; in verify()
|
D | CtsMockitoUtils.java | 23 public static VerificationMode within(long timeout) { in within() argument 24 return new Within(timeout); in within()
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/os/ |
D | TimeoutResetActivity.java | 59 private static void setUserActivityTimeout(WindowManager.LayoutParams params, long timeout) { in setUserActivityTimeout() argument 61 getUserActivityTimeoutField(params).setLong(params, timeout); in setUserActivityTimeout() 62 Log.d(TAG, "UserActivityTimeout set to " + timeout); in setUserActivityTimeout() 78 final long timeout = SCREEN_OFF_TIMEOUT; in turnOffScreen() 79 setUserActivityTimeout(params, timeout); in turnOffScreen() 101 long timeout = getIntent().getLongExtra(EXTRA_OLD_TIMEOUT, FALLBACK_TIMEOUT); in onCreate() local 102 if (timeout < 1000) { // in case the old timeout was super low by accident in onCreate() 103 timeout = FALLBACK_TIMEOUT; in onCreate() 107 setUserActivityTimeout(params, timeout); in onCreate()
|
/cts/hostsidetests/theme/ |
D | android_device.py | 34 def run_adb_command(self, cmd, timeout=None): argument 39 (out, err) = adb_process.communicate(timeout=timeout) 45 def wait_for_device(self, timeout=30): argument 46 return self.run_adb_command('wait-for-device', timeout) 48 def wait_for_prop(self, key, value, timeout=30): argument 52 while not boot_complete and (attempts*wait_period) < timeout: 63 def wait_for_service(self, name, timeout=30): argument 67 while not service_found and (attempts*wait_period) < timeout: 78 def wait_for_boot_complete(self, timeout=60): argument 79 return self.wait_for_prop('dev.bootcomplete', '1', timeout)
|
/cts/tests/inputmethod/mockime/src/com/android/cts/mockime/ |
D | ImeEventStreamTestUtils.java | 81 @NonNull Predicate<ImeEvent> condition, long timeout) throws TimeoutException { in expectEvent() argument 82 return expectEvent(stream, condition, EventFilterMode.CHECK_ENTER_EVENT_ONLY, timeout); in expectEvent() 102 @NonNull Predicate<ImeEvent> condition, EventFilterMode filterMode, long timeout) in expectEvent() argument 107 if (timeout < 0) { in expectEvent() 130 timeout -= TIME_SLICE; in expectEvent() 178 @NonNull ImeCommand command, long timeout) throws TimeoutException { 187 return expectEvent(stream, predicate, EventFilterMode.CHECK_EXIT_EVENT_ONLY, timeout); 207 @NonNull Predicate<ImeEvent> condition, long timeout) { 208 notExpectEvent(stream, condition, EventFilterMode.CHECK_ENTER_EVENT_ONLY, timeout); 224 @NonNull Predicate<ImeEvent> condition, EventFilterMode filterMode, long timeout) { [all …]
|
/cts/tests/app/src/android/app/cts/android/app/cts/tools/ |
D | ServiceConnectionHandler.java | 78 public void waitForConnect(long timeout) { in waitForConnect() argument 79 final long endTime = SystemClock.uptimeMillis() + timeout; in waitForConnect() 103 public void waitForDisconnect(long timeout) { in waitForDisconnect() argument 104 final long endTime = SystemClock.uptimeMillis() + timeout; in waitForDisconnect() 142 public void bind(long timeout) { in bind() argument 155 waitForConnect(timeout); in bind() 163 public void unbind(long timeout) { in unbind() argument 174 waitForDisconnect(timeout); in unbind() 185 public void cleanup(long timeout) { in cleanup() argument 188 unbind(timeout); in cleanup()
|
D | ServiceProcessController.java | 107 public void denyBackgroundOp(long timeout) throws IOException { in denyBackgroundOp() argument 112 mUidWatcher.expect(WatchUidRunner.CMD_IDLE, null, timeout); in denyBackgroundOp() 113 mUidWatcher.expect(WatchUidRunner.CMD_PROCSTATE, "NONE", timeout); in denyBackgroundOp() 184 public void ensureProcessGone(long timeout) { in ensureProcessGone() argument 186 mConnections[i].bind(timeout); in ensureProcessGone() 191 mConnections[i].unbind(timeout); in ensureProcessGone() 200 ActivityManager.RunningAppProcessInfo.IMPORTANCE_GONE, timeout); in ensureProcessGone() 206 mUidWatcher.waitFor(WatchUidRunner.CMD_GONE, null, timeout); in ensureProcessGone()
|
/cts/hostsidetests/inputmethodservice/deviceside/devicetest/src/android/inputmethodservice/cts/devicetest/ |
D | BusyWaitUtils.java | 46 static void pollingCheck(final PollingCondition condition, final long timeout, in pollingCheck() argument 48 if (waitFor(condition, timeout)) { in pollingCheck() 61 static boolean waitFor(final PollingCondition condition, final long timeout) throws Exception { in waitFor() argument 62 for (long remaining = timeout; remaining > 0; remaining -= POLLING_INTERVAL) { in waitFor()
|
/cts/tests/inputmethod/src/android/view/inputmethod/cts/util/ |
D | TestUtils.java | 69 @NonNull BooleanSupplier condition, long timeout, String message) in waitOnMainUntil() argument 75 if (timeout < 0) { in waitOnMainUntil() 88 timeout -= TIME_SLICE; in waitOnMainUntil() 100 public static void waitOnMainUntil(@NonNull BooleanSupplier condition, long timeout) in waitOnMainUntil() argument 102 waitOnMainUntil(condition, timeout, ""); in waitOnMainUntil()
|
D | WindowFocusStealer.java | 52 public void waitResult(long timeout) throws TimeoutException { in waitResult() argument 55 result = mQueue.poll(timeout, TimeUnit.MILLISECONDS); in waitResult() 78 public void stealWindowFocus(IBinder parentAppWindowToken, long timeout) in stealWindowFocus() argument 86 resultReceiver.waitResult(timeout); in stealWindowFocus() 101 public static WindowFocusStealer connect(Context context, long timeout) in connect() argument 120 focusStealer = queue.poll(timeout, TimeUnit.MILLISECONDS); in connect()
|
/cts/tests/tests/database/src/android/database/cts/ |
D | ContentObserverTest.java | 52 final long timeout = 1000L; in testContentObserver() local 58 assertTrue(contentObserver.hasChanged(timeout)); in testContentObserver() 66 assertTrue(contentObserver.hasChanged(timeout)); in testContentObserver() 96 final long timeout = 1000L; in testContentObserverWithUri() local 102 assertTrue(contentObserver.hasChanged(timeout)); in testContentObserverWithUri() 111 assertTrue(contentObserver.hasChanged(timeout)); in testContentObserverWithUri() 141 protected synchronized boolean hasChanged(long timeout) throws InterruptedException { in hasChanged() argument 143 wait(timeout); in hasChanged() 186 protected synchronized boolean hasChanged(long timeout) throws InterruptedException { in hasChanged() argument 188 wait(timeout); in hasChanged()
|
/cts/tests/tests/webkit/src/android/webkit/cts/ |
D | ChromeClient.java | 40 public synchronized ConsoleMessage.MessageLevel getMessageLevel(int timeout) { in getMessageLevel() argument 41 for(; timeout > 0; timeout -= 1000) { in getMessageLevel()
|
/cts/tests/tests/view/src/android/view/cts/ |
D | ChoreographerTest.java | 23 import static org.mockito.Mockito.timeout; 84 verify(addedCallback1, timeout(NOMINAL_VSYNC_PERIOD * 10).times(1)).run(); in testPostCallbackWithoutDelay() 85 verify(addedCallback2, timeout(NOMINAL_VSYNC_PERIOD * 10).times(1)).run(); in testPostCallbackWithoutDelay() 92 verify(addedCallback1, timeout(NOMINAL_VSYNC_PERIOD * 10).times(2)).run(); in testPostCallbackWithoutDelay() 103 verify(addedCallback1, timeout(NOMINAL_VSYNC_PERIOD * 10).times(3)).run(); in testPostCallbackWithoutDelay() 114 verify(addedCallback1, timeout(NOMINAL_VSYNC_PERIOD * 10).times(4)).run(); in testPostCallbackWithoutDelay() 147 verify(addedCallback, timeout(DELAY_PERIOD * 3).times(1)).run(); in testPostCallbackWithDelay() 157 verify(addedCallback, timeout(DELAY_PERIOD * 3).times(2)).run(); in testPostCallbackWithDelay() 168 verify(addedCallback, timeout(DELAY_PERIOD * 3).times(3)).run(); in testPostCallbackWithDelay() 208 verify(addedFrameCallback1, timeout(NOMINAL_VSYNC_PERIOD * 10).times(1)) in testPostFrameCallbackWithoutDelay() [all …]
|
/cts/tests/app/app/src/android/app/stubs/ |
D | MockService.java | 88 public static boolean waitForStart(long timeout) { in waitForStart() argument 90 final long endTime = now + timeout; in waitForStart() 110 public static boolean waitForDestroy(long timeout) { in waitForDestroy() argument 112 final long endTime = now + timeout; in waitForDestroy()
|
/cts/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/ |
D | BluetoothRestrictionTest.java | 168 final long timeout = SystemClock.elapsedRealtime() + DISABLE_TIMEOUT_MS; in assertDisabledAfterTimeout() local 169 while (SystemClock.elapsedRealtime() < timeout) { in assertDisabledAfterTimeout() 188 final long timeout = SystemClock.elapsedRealtime() + COMPONENT_STATE_TIMEOUT_MS; in assertComponentStateAfterTimeout() local 190 while (SystemClock.elapsedRealtime() < timeout) { in assertComponentStateAfterTimeout() 229 final long timeout = SystemClock.elapsedRealtime() + ENABLE_TIMEOUT_MS; in assertEnabledAfterTimeout() local 230 while (SystemClock.elapsedRealtime() < timeout) { in assertEnabledAfterTimeout()
|
/cts/tests/accessibility/src/android/view/accessibility/cts/ |
D | CaptioningManagerTest.java | 22 import static org.mockito.Mockito.timeout; 73 verify(mockListener, timeout(LISTENER_TIMEOUT)).onEnabledChanged(true); in testChangeListener() 78 verify(mockListener, timeout(LISTENER_TIMEOUT)).onUserStyleChanged(anyObject()); in testChangeListener() 81 verify(mockListener, timeout(LISTENER_TIMEOUT)).onLocaleChanged(anyObject()); in testChangeListener() 84 verify(mockListener, timeout(LISTENER_TIMEOUT)).onFontScaleChanged(anyFloat()); in testChangeListener()
|
/cts/hostsidetests/security/src/android/security/cts/ |
D | AdbUtils.java | 69 public static String runPoc(String pocName, ITestDevice device, int timeout) throws Exception { in runPoc() argument 72 … device.executeShellCommand("/data/local/tmp/" + pocName, receiver, timeout, TimeUnit.SECONDS, 0); in runPoc() 84 public static void runPocNoOutput(String pocName, ITestDevice device, int timeout) in runPocNoOutput() argument 88 device.executeShellCommand("/data/local/tmp/" + pocName, receiver, timeout, in runPocNoOutput() 207 int timeout) throws Exception { in runPocCheckExitCode() argument 211 receiver, timeout, TimeUnit.SECONDS, 0); in runPocCheckExitCode()
|
/cts/tests/tests/content/src/android/content/cts/ |
D | DeferSyncTest.java | 35 import static org.mockito.Mockito.timeout; 113 verify(adapter, timeout(SYNC_TIMEOUT_MILLIS)).onUnsyncableAccount(); in deferSyncAndMakeSyncable() 120 verify(adapter, timeout(SYNC_TIMEOUT_MILLIS)).onPerformSync(any(), in deferSyncAndMakeSyncable() 138 verify(adapter, timeout(SYNC_TIMEOUT_MILLIS)).onUnsyncableAccount(); in deferSyncAndReportIsReady() 146 verify(adapter, timeout(SYNC_TIMEOUT_MILLIS)).onPerformSync(any(), in deferSyncAndReportIsReady() 163 verify(adapter, timeout(SYNC_TIMEOUT_MILLIS)).onUnsyncableAccount(); in deferSyncAndReportIsReadyAlwaysSyncable() 171 verify(adapter, timeout(SYNC_TIMEOUT_MILLIS)).onPerformSync(any(), in deferSyncAndReportIsReadyAlwaysSyncable() 190 verify(adapter, timeout(SYNC_TIMEOUT_MILLIS).atLeast(2)).onUnsyncableAccount(); in onNewAccountForEachAccount() 195 verify(adapter, timeout(SYNC_TIMEOUT_MILLIS)).onPerformSync(any(), in onNewAccountForEachAccount()
|
/cts/tests/camera/src/android/hardware/camera2/cts/ |
D | FlashlightTest.java | 85 verify(torchListener, timeout(TORCH_TIMEOUT_MS). in testSetTorchModeOnOff() 87 verify(torchListener, timeout(TORCH_TIMEOUT_MS). in testSetTorchModeOnOff() 90 verify(torchListener, timeout(TORCH_TIMEOUT_MS). in testSetTorchModeOnOff() 92 verify(torchListener, timeout(TORCH_TIMEOUT_MS). in testSetTorchModeOnOff() 118 verify(torchListener, timeout(TORCH_TIMEOUT_MS).times(mFlashCameraIdList.size())). in testSetTorchModeOnOff() 121 verify(torchListener, timeout(TORCH_TIMEOUT_MS). in testSetTorchModeOnOff() 156 verify(torchListener, timeout(TORCH_TIMEOUT_MS). in testTorchCallback() 203 verify(torchListener, timeout(TORCH_TIMEOUT_MS).times(1)). in testCameraDeviceOpenAfterTorchOn() 205 verify(torchListener, timeout(TORCH_TIMEOUT_MS).times(1)). in testCameraDeviceOpenAfterTorchOn() 208 verify(torchListener, timeout(TORCH_TIMEOUT_MS).atLeast(2)). in testCameraDeviceOpenAfterTorchOn() [all …]
|
/cts/hostsidetests/incident/apps/batterystatsapp/src/com/android/server/cts/device/batterystats/ |
D | BatteryStatsSyncAdapter.java | 80 final long timeout = SystemClock.elapsedRealtime() + (TIMEOUT_SECONDS * 1000); in waitUntilSyncCount() local 88 final long sleep = timeout - SystemClock.elapsedRealtime(); in waitUntilSyncCount() 118 final long timeout = SystemClock.elapsedRealtime() + (TIMEOUT_SECONDS * 1000); in cancelPendingSyncs() local 127 final long sleep = timeout - SystemClock.elapsedRealtime(); in cancelPendingSyncs()
|