/cts/common/device-side/util/tests/src/com/android/compatibility/common/util/ |
D | TimeoutTest.java | 68 final Timeout timeout = new Timeout(NAME, 1, 2, 5); in testGetters() local 69 assertThat(timeout.ms()).isEqualTo(1); in testGetters() 70 assertFloat(timeout.getMultiplier(), 2); in testGetters() 71 assertThat(timeout.getMaxValue()).isEqualTo(5); in testGetters() 72 assertThat(timeout.getName()).isEqualTo(NAME); in testGetters() 77 final Timeout timeout = new Timeout(NAME, 1, 2, 5); in testIncrease() local 79 assertThat(timeout.increase()).isEqualTo(1); in testIncrease() 80 assertThat(timeout.ms()).isEqualTo(2); in testIncrease() 81 assertThat(timeout.increase()).isEqualTo(2); in testIncrease() 82 assertThat(timeout.ms()).isEqualTo(4); in testIncrease() [all …]
|
/cts/common/device-side/util-axt/tests/src/com/android/compatibility/common/util/ |
D | TimeoutTest.java | 68 final Timeout timeout = new Timeout(NAME, 1, 2, 5); in testGetters() local 69 assertThat(timeout.ms()).isEqualTo(1); in testGetters() 70 assertFloat(timeout.getMultiplier(), 2); in testGetters() 71 assertThat(timeout.getMaxValue()).isEqualTo(5); in testGetters() 72 assertThat(timeout.getName()).isEqualTo(NAME); in testGetters() 77 final Timeout timeout = new Timeout(NAME, 1, 2, 5); in testIncrease() local 79 assertThat(timeout.increase()).isEqualTo(1); in testIncrease() 80 assertThat(timeout.ms()).isEqualTo(2); in testIncrease() 81 assertThat(timeout.increase()).isEqualTo(2); in testIncrease() 82 assertThat(timeout.ms()).isEqualTo(4); in testIncrease() [all …]
|
/cts/common/device-side/util-axt/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 | 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 | 90 final Timeout timeout = e.getTimeout(); in apply() 91 if (timeout != null) { in apply() 92 long before = timeout.ms(); in apply() 93 timeout.increase(); in apply() 94 Log.d(TAG, "Increased " + timeout.getName() + " from " + before + "ms" in apply() 95 + " to " + timeout.ms() + "ms"); in apply()
|
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()
|
/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 | 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 | 73 final Timeout timeout = e.getTimeout(); in apply() 74 if (timeout != null) { in apply() 75 long before = timeout.ms(); in apply() 76 timeout.increase(); in apply() 77 Log.d(TAG, "Increased " + timeout.getName() + " from " + before + "ms" in apply() 78 + " to " + timeout.ms() + "ms"); in apply()
|
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()
|
/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 | 82 @NonNull Predicate<ImeEvent> condition, long timeout) throws TimeoutException { in expectEvent() argument 83 return expectEvent(stream, condition, EventFilterMode.CHECK_ENTER_EVENT_ONLY, timeout); in expectEvent() 103 @NonNull Predicate<ImeEvent> condition, EventFilterMode filterMode, long timeout) in expectEvent() argument 108 if (timeout < 0) { in expectEvent() 131 timeout -= TIME_SLICE; in expectEvent() 196 @NonNull ImeCommand command, long timeout) throws TimeoutException { 205 return expectEvent(stream, predicate, EventFilterMode.CHECK_EXIT_EVENT_ONLY, timeout); 225 @NonNull Predicate<ImeEvent> condition, long timeout) { 226 notExpectEvent(stream, condition, EventFilterMode.CHECK_ENTER_EVENT_ONLY, timeout); 242 @NonNull Predicate<ImeEvent> condition, EventFilterMode filterMode, long timeout) { [all …]
|
/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/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() 196 public void ensureProcessGone(long timeout) { in ensureProcessGone() argument 198 mConnections[i].bind(timeout); in ensureProcessGone() 203 mConnections[i].unbind(timeout); in ensureProcessGone() 212 ActivityManager.RunningAppProcessInfo.IMPORTANCE_GONE, timeout); in ensureProcessGone() 218 mUidWatcher.waitFor(WatchUidRunner.CMD_GONE, null, timeout); in ensureProcessGone()
|
/cts/tests/autofillservice/src/android/autofillservice/cts/ |
D | UiBot.java | 377 public UiObject2 assertShownByText(String text, Timeout timeout) throws Exception { 378 final UiObject2 object = waitForObject(By.text(text), timeout); 450 public UiObject2 assertShownByRelativeId(String id, Timeout timeout) throws Exception { 451 final UiObject2 obj = waitForObject(By.res(mPackageName, id), timeout); 462 public void assertGoneByRelativeId(@NonNull String id, @NonNull Timeout timeout) { 463 assertGoneByRelativeId(/* parent = */ null, id, timeout); 466 public void assertGoneByRelativeId(int resId, @NonNull Timeout timeout) { 467 assertGoneByRelativeId(/* parent = */ null, getIdName(resId), timeout); 481 @NonNull Timeout timeout) { 484 ? parent.wait(condition, timeout.ms()) [all …]
|
/cts/hostsidetests/securitybulletin/src/android/security/cts/ |
D | AdbUtils.java | 89 public static String runPoc(String pocName, ITestDevice device, int timeout) throws Exception { in runPoc() argument 90 return runPoc(pocName, device, timeout, null); in runPoc() 102 public static String runPoc(String pocName, ITestDevice device, int timeout, String arguments) in runPoc() argument 108 timeout, TimeUnit.SECONDS, 0); in runPoc() 110 device.executeShellCommand("/data/local/tmp/" + pocName, receiver, timeout, in runPoc() 124 public static void runPocNoOutput(String pocName, ITestDevice device, int timeout) in runPocNoOutput() argument 126 runPocNoOutput(pocName, device, timeout, null); in runPocNoOutput() 138 public static void runPocNoOutput(String pocName, ITestDevice device, int timeout, in runPocNoOutput() argument 144 timeout, TimeUnit.SECONDS, 0); in runPocNoOutput() 146 device.executeShellCommand("/data/local/tmp/" + pocName, receiver, timeout, in runPocNoOutput() [all …]
|
/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/view/src/android/view/cts/ |
D | ChoreographerTest.java | 23 import static org.mockito.Mockito.timeout; 85 verify(addedCallback1, timeout(NOMINAL_VSYNC_PERIOD * 30).times(1)).run(); in testPostCallbackWithoutDelay() 86 verify(addedCallback2, timeout(NOMINAL_VSYNC_PERIOD * 30).times(1)).run(); in testPostCallbackWithoutDelay() 93 verify(addedCallback1, timeout(NOMINAL_VSYNC_PERIOD * 30).times(2)).run(); in testPostCallbackWithoutDelay() 104 verify(addedCallback1, timeout(NOMINAL_VSYNC_PERIOD * 30).times(3)).run(); in testPostCallbackWithoutDelay() 115 verify(addedCallback1, timeout(NOMINAL_VSYNC_PERIOD * 30).times(4)).run(); in testPostCallbackWithoutDelay() 148 verify(addedCallback, timeout(DELAY_PERIOD * 3).times(1)).run(); in testPostCallbackWithDelay() 158 verify(addedCallback, timeout(DELAY_PERIOD * 3).times(2)).run(); in testPostCallbackWithDelay() 169 verify(addedCallback, timeout(DELAY_PERIOD * 3).times(3)).run(); in testPostCallbackWithDelay() 209 verify(addedFrameCallback1, timeout(NOMINAL_VSYNC_PERIOD * 10).times(1)) in testPostFrameCallbackWithoutDelay() [all …]
|
/cts/tests/tests/os/src/android/os/cts/ |
D | PowerManager_ThermalTest.java | 23 import static org.mockito.Mockito.timeout; 84 verify(mListener1, timeout(CALLBACK_TIMEOUT_MILLI_SEC) in testThermalStatusCallback() 89 verify(mListener1, timeout(CALLBACK_TIMEOUT_MILLI_SEC) in testThermalStatusCallback() 102 verify(mListener1, timeout(CALLBACK_TIMEOUT_MILLI_SEC) in testThermalStatusCallback() 104 verify(mListener2, timeout(CALLBACK_TIMEOUT_MILLI_SEC) in testThermalStatusCallback() 118 verify(mListener1, timeout(CALLBACK_TIMEOUT_MILLI_SEC) in testThermalStatusCallback() 120 verify(mListener2, timeout(CALLBACK_TIMEOUT_MILLI_SEC) in testThermalStatusCallback()
|
/cts/tests/camera/src/android/hardware/camera2/cts/ |
D | FlashlightTest.java | 83 verify(torchListener, timeout(TORCH_TIMEOUT_MS). in testSetTorchModeOnOff() 85 verify(torchListener, timeout(TORCH_TIMEOUT_MS). in testSetTorchModeOnOff() 88 verify(torchListener, timeout(TORCH_TIMEOUT_MS). in testSetTorchModeOnOff() 90 verify(torchListener, timeout(TORCH_TIMEOUT_MS). in testSetTorchModeOnOff() 116 verify(torchListener, timeout(TORCH_TIMEOUT_MS).times(mFlashCameraIdList.size())). in testSetTorchModeOnOff() 119 verify(torchListener, timeout(TORCH_TIMEOUT_MS). in testSetTorchModeOnOff() 154 verify(torchListener, timeout(TORCH_TIMEOUT_MS). in testTorchCallback() 201 verify(torchListener, timeout(TORCH_TIMEOUT_MS).times(1)). in testCameraDeviceOpenAfterTorchOn() 203 verify(torchListener, timeout(TORCH_TIMEOUT_MS).times(1)). in testCameraDeviceOpenAfterTorchOn() 206 verify(torchListener, timeout(TORCH_TIMEOUT_MS).atLeast(2)). in testCameraDeviceOpenAfterTorchOn() [all …]
|
/cts/tests/inputmethod/src/android/view/inputmethod/cts/util/ |
D | TestUtils.java | 70 @NonNull BooleanSupplier condition, long timeout, String message) in waitOnMainUntil() argument 76 if (timeout < 0) { in waitOnMainUntil() 89 timeout -= TIME_SLICE; in waitOnMainUntil() 101 public static void waitOnMainUntil(@NonNull BooleanSupplier condition, long timeout) in waitOnMainUntil() argument 103 waitOnMainUntil(condition, timeout, ""); in waitOnMainUntil()
|
D | WindowFocusStealer.java | 53 public void waitResult(long timeout) throws TimeoutException { in waitResult() argument 56 result = mQueue.poll(timeout, TimeUnit.MILLISECONDS); in waitResult() 79 public void stealWindowFocus(IBinder parentAppWindowToken, long timeout) in stealWindowFocus() argument 87 resultReceiver.waitResult(timeout); in stealWindowFocus() 102 public static WindowFocusStealer connect(Context context, long timeout) in connect() argument 121 focusStealer = queue.poll(timeout, TimeUnit.MILLISECONDS); in connect()
|
/cts/hostsidetests/inputmethodservice/common/src/android/inputmethodservice/cts/common/ |
D | BusyWaitUtils.java | 56 public static void pollingCheck(PollingCondition condition, long timeout, String message) in pollingCheck() argument 58 if (waitFor(condition, timeout)) { in pollingCheck() 71 static boolean waitFor(PollingCondition condition, long timeout) throws Exception { in waitFor() argument 72 for (long remaining = timeout; remaining > 0; remaining -= POLLING_INTERVAL) { in waitFor()
|
/cts/libs/deviceutillegacy/src/android/webkit/cts/ |
D | WebViewSyncLoader.java | 251 private void waitForCriteria(long timeout, Callable<Boolean> doneCriteria) { in waitForCriteria() argument 253 waitOnUiThread(timeout, doneCriteria); in waitForCriteria() 255 waitOnTestThread(timeout, doneCriteria); in waitForCriteria() 302 private void waitOnUiThread(long timeout, final Callable<Boolean> doneCriteria) { in waitOnUiThread() argument 303 new PollingCheck(timeout) { in waitOnUiThread() argument 321 private synchronized void waitOnTestThread(long timeout, Callable<Boolean> doneCriteria) { in waitOnTestThread() argument 323 long waitEnd = SystemClock.uptimeMillis() + timeout; in waitOnTestThread() 324 long timeRemaining = timeout; in waitOnTestThread()
|