/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 | 42 public PollingCheck(long timeout) { in PollingCheck() argument 43 this(timeout, DEFAULT_ERROR_MESSAGE); in PollingCheck() 46 public PollingCheck(long timeout, String errorMessage) { in PollingCheck() argument 47 mTimeout = timeout; in PollingCheck() 66 long timeout = mTimeout; in run() local 67 while (timeout > 0) { in run() 78 timeout -= TIME_SLICE; in run() 89 long timeout = mTimeout; in runWaitAndReturnResult() local 90 while (timeout > 0) { in runWaitAndReturnResult() 102 timeout -= TIME_SLICE; in runWaitAndReturnResult() [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 | 91 final Timeout timeout = e.getTimeout(); in apply() 92 if (timeout != null) { in apply() 93 long before = timeout.ms(); in apply() 94 timeout.increase(); in apply() 95 Log.d(TAG, "Increased " + timeout.getName() + " from " + before + "ms" in apply() 96 + " 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/inputmethodservice/deviceside/devicetest/src/android/inputmethodservice/cts/devicetest/ |
D | InputMethodVisibilityVerifier.java | 47 private static boolean waitUntilWatermarkBecomesVisible(long timeout, in waitUntilWatermarkBecomesVisible() argument 58 if (!latch.await(timeout, TimeUnit.MILLISECONDS)) { in waitUntilWatermarkBecomesVisible() 75 lastCheck = (SystemClock.elapsedRealtime() - startTime) >= timeout; in waitUntilWatermarkBecomesVisible() 91 static void assertIme1Visible(long timeout) { in assertIme1Visible() argument 92 assertTrue(waitUntilWatermarkBecomesVisible(timeout, Watermark.IME1)); in assertIme1Visible() 101 static void assumeIme1Visible(String message, long timeout) { in assumeIme1Visible() argument 102 assumeTrue(message, waitUntilWatermarkBecomesVisible(timeout, Watermark.IME1)); in assumeIme1Visible() 110 static void assertIme2Visible(long timeout) { in assertIme2Visible() argument 111 assertTrue(waitUntilWatermarkBecomesVisible(timeout, Watermark.IME2)); in assertIme2Visible()
|
/cts/tests/inputmethod/util/src/android/view/inputmethod/cts/util/ |
D | InputMethodVisibilityVerifier.java | 62 private static boolean waitUntil(long timeout, @NonNull Predicate<UiAutomation> condition) { in waitUntil() argument 72 if (!latch.await(timeout, TimeUnit.MILLISECONDS)) { in waitUntil() 82 while ((SystemClock.elapsedRealtime() - startTime) < timeout) { in waitUntil() 100 public static void expectImeVisible(long timeout) { in expectImeVisible() argument 101 assertTrue(waitUntil(timeout, InputMethodVisibilityVerifier::containsWatermark)); in expectImeVisible() 111 public static void expectImeVisible(long timeout, String message) { in expectImeVisible() argument 112 assertTrue(message, waitUntil(timeout, InputMethodVisibilityVerifier::containsWatermark)); in expectImeVisible() 124 public static void expectImeInvisible(long timeout) { in expectImeInvisible() argument 125 assertTrue(waitUntil(timeout, InputMethodVisibilityVerifier::notContainsWatermark)); in expectImeInvisible()
|
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/tests/inputmethod/mocka11yime/client/src/com/android/cts/mocka11yime/ |
D | MockA11yImeEventStreamUtils.java | 81 @NonNull Predicate<MockA11yImeEvent> condition, long timeout) throws TimeoutException { in expectA11yImeEvent() argument 83 MockA11yImeEventStreamUtils.EventFilterMode.CHECK_ENTER_EVENT_ONLY, timeout); in expectA11yImeEvent() 104 MockA11yImeEventStreamUtils.EventFilterMode filterMode, long timeout) in expectA11yImeEvent() argument 107 if (timeout < 0) { in expectA11yImeEvent() 131 timeout -= TIME_SLICE; in expectA11yImeEvent() 170 @NonNull MockA11yImeCommand command, long timeout) throws TimeoutException { 180 MockA11yImeEventStreamUtils.EventFilterMode.CHECK_EXIT_EVENT_ONLY, timeout); 198 @NonNull Predicate<MockA11yImeEvent> condition, long timeout) { 200 MockA11yImeEventStreamUtils.EventFilterMode.CHECK_ENTER_EVENT_ONLY, timeout); 217 MockA11yImeEventStreamUtils.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/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/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()
|
/cts/tests/framework/base/windowmanager/util/src/android/server/wm/ |
D | InputMethodVisibilityVerifier.java | 58 private static boolean waitUntil(long timeout, @NonNull Predicate<UiAutomation> condition) { in waitUntil() argument 68 if (!latch.await(timeout, TimeUnit.MILLISECONDS)) { in waitUntil() 78 while ((SystemClock.elapsedRealtime() - startTime) < timeout) { in waitUntil() 96 public static void expectImeVisible(long timeout) { in expectImeVisible() argument 97 assertTrue(waitUntil(timeout, InputMethodVisibilityVerifier::containsWatermark)); in expectImeVisible() 109 public static void expectImeInvisible(long timeout) { in expectImeInvisible() argument 110 assertTrue(waitUntil(timeout, InputMethodVisibilityVerifier::notContainsWatermark)); in expectImeInvisible()
|
/cts/tests/tests/voiceinteraction/src/android/voiceinteraction/cts/ |
D | VoiceInteractionTestReceiver.java | 44 public static void waitSessionStarted(long timeout, TimeUnit unit) throws InterruptedException { in waitSessionStarted() argument 45 Intent intent = sServiceStartedQueue.poll(timeout, unit); in waitSessionStarted() 56 public static boolean waitScreenshotReceived(long timeout, TimeUnit unit) in waitScreenshotReceived() argument 58 Intent intent = sScreenshotReceivedQueue.poll(timeout, unit); in waitScreenshotReceived() 70 public static boolean waitAssistDataReceived(long timeout, TimeUnit unit) in waitAssistDataReceived() argument 72 Intent intent = sAssistDataReceivedQueue.poll(timeout, unit); in waitAssistDataReceived() 85 public static Bundle waitOnShowReceived(long timeout, TimeUnit unit) in waitOnShowReceived() argument 87 Intent intent = sOnShowReceivedQueue.poll(timeout, unit); in waitOnShowReceived()
|
/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/hostsidetests/securitybulletin/src/android/security/cts/ |
D | AdbUtils.java | 120 public static String runPoc(String pocName, ITestDevice device, int timeout) throws Exception { in runPoc() argument 121 return runPoc(pocName, device, timeout, null); in runPoc() 135 public static String runPoc(String pocName, ITestDevice device, int timeout, String arguments) in runPoc() argument 138 runPoc(pocName, device, timeout, arguments, receiver); in runPoc() 151 public static void runPocNoOutput(String pocName, ITestDevice device, int timeout) in runPocNoOutput() argument 153 runPocNoOutput(pocName, device, timeout, null); in runPocNoOutput() 167 String pocName, ITestDevice device, int timeout, String arguments) throws Exception { in runPocNoOutput() argument 168 runPoc(pocName, device, timeout, arguments, null); in runPocNoOutput() 185 int timeout, in runPoc() argument 189 return runPoc(pocName, device, timeout, arguments, null, receiver); in runPoc() [all …]
|
/cts/hostsidetests/multidevices/bluetooth/snippet/ |
D | BluetoothGattMultiDevicesClient.java | 95 boolean timeout = false; in connect() 97 timeout = !serverFoundBlocker.await(CALLBACK_TIMEOUT_SEC, SECONDS); in connect() 100 timeout = true; in connect() 103 if (timeout) { in connect() 111 timeout = false; in connect() 113 timeout = !mConnectionBlocker.await(CALLBACK_TIMEOUT_SEC, SECONDS); in connect() 116 timeout = true; in connect() 118 if (timeout) { in connect()
|
/cts/common/device-side/bedstead/nene/src/main/java/com/android/bedstead/nene/utils/ |
D | VoidRetry.java | 42 public VoidRetry timeout(Duration timeout) { in timeout() argument 43 mRetry.timeout(timeout); in timeout()
|
D | Retry.java | 67 public Retry<E> timeout(Duration timeout) { in timeout() method in Retry 68 mPoll.timeout(timeout); in timeout()
|
/cts/tests/inputmethod/mockime/src/com/android/cts/mockime/ |
D | ImeEventStreamTestUtils.java | 109 @NonNull Predicate<ImeEvent> condition, long timeout) throws TimeoutException { in expectEvent() argument 110 return expectEvent(stream, condition, EventFilterMode.CHECK_ENTER_EVENT_ONLY, timeout); in expectEvent() 130 @NonNull Predicate<ImeEvent> condition, EventFilterMode filterMode, long timeout) in expectEvent() argument 135 if (timeout < 0) { in expectEvent() 146 timeout -= TIME_SLICE; in expectEvent() 270 @NonNull ImeCommand command, long timeout) throws TimeoutException { 280 return expectEvent(stream, predicate, EventFilterMode.CHECK_EXIT_EVENT_ONLY, timeout); 300 @NonNull Predicate<ImeEvent> condition, long timeout) { 301 notExpectEvent(stream, condition, EventFilterMode.CHECK_ENTER_EVENT_ONLY, timeout); 317 @NonNull Predicate<ImeEvent> condition, EventFilterMode filterMode, long timeout) { [all …]
|
/cts/tests/tests/uidmigration/ |
D | system-app-test.sh | 64 timeout 60 bash -c wait_boot_complete 95 timeout 60 bash -c wait_boot_complete 116 timeout 60 bash -c wait_boot_complete 132 timeout 60 bash -c wait_boot_complete 149 timeout 60 bash -c wait_boot_complete 155 timeout 60 bash -c wait_boot_complete
|
/cts/common/device-side/bedstead/nene/src/test/java/com/android/bedstead/nene/utils/ |
D | PollTest.java | 71 .timeout(SHORT_TIMEOUT) in await_toBeEqualTo_doesNotBecomeEqual_returnIncorrectValue() 82 .timeout(SHORT_TIMEOUT) in await_toBeEqualTo_errorOnFailure_doesNotBecomeEqual_throwsException() 96 .timeout(SHORT_TIMEOUT) in await_toBeEqualTo_errorOnFailure_doesNotBecomeEqual_customError_throwsException() 127 .timeout(SHORT_TIMEOUT) in await_toNotBeEqualTo_doesNotBecomeNotEqual_returnIncorrectValue() 138 .timeout(SHORT_TIMEOUT) in await_toNotBeEqualTo_errorOnFailure_doesNotBecomeNotEqual_throwsException() 152 .timeout(SHORT_TIMEOUT) in await_toNotBeEqualTo_errorOnFailure_doesNotBecomeNotEqual_customError_throwsException() 183 .timeout(SHORT_TIMEOUT) in await_toBeNull_doesNotBecomeNull_returnIncorrectValue() 194 .timeout(SHORT_TIMEOUT) in await_toBeNull_errorOnFailure_doesNotBecomeNull_throwsException() 208 .timeout(SHORT_TIMEOUT) in await_toBeNull_errorOnFailure_doesNotBecomeNull_customError_throwsException() 239 .timeout(SHORT_TIMEOUT) in await_toNotBeNull_doesNotBecomeNotNull_returnIncorrectValue() [all …]
|
/cts/tests/appsearch/testutils/src/android/app/appsearch/testutil/functions/ |
D | TestAppFunctionServiceLifecycleReceiver.java | 63 public static boolean waitForServiceOnDestroy(long timeout, TimeUnit unit) in waitForServiceOnDestroy() argument 65 return sOnDestroyedLatch.await(timeout, unit); in waitForServiceOnDestroy() 77 public static boolean waitForServiceOnCreate(long timeout, TimeUnit unit) in waitForServiceOnCreate() argument 79 return sOnCreateLatch.await(timeout, unit); in waitForServiceOnCreate()
|
/cts/tests/camera/src/android/hardware/camera2/cts/ |
D | FlashlightTest.java | 155 verify(torchListener, timeout(TORCH_TIMEOUT_MS). in testTurnOnTorchWithStrengthLevel() 158 verify(torchListener,timeout(TORCH_TIMEOUT_MS). in testTurnOnTorchWithStrengthLevel() 160 verify(torchListener,timeout(TORCH_TIMEOUT_MS). in testTurnOnTorchWithStrengthLevel() 162 verify(torchListener,timeout(TORCH_TIMEOUT_MS). in testTurnOnTorchWithStrengthLevel() 165 verify(torchListener, timeout(TORCH_TIMEOUT_MS). in testTurnOnTorchWithStrengthLevel() 196 verify(torchListener, timeout(TORCH_TIMEOUT_MS). in testSetTorchModeOnOff() 198 verify(torchListener, timeout(TORCH_TIMEOUT_MS). in testSetTorchModeOnOff() 201 verify(torchListener, timeout(TORCH_TIMEOUT_MS). in testSetTorchModeOnOff() 203 verify(torchListener, timeout(TORCH_TIMEOUT_MS). in testSetTorchModeOnOff() 229 verify(torchListener, timeout(TORCH_TIMEOUT_MS).times(mFlashCameraIdList.size())). in testSetTorchModeOnOff() [all …]
|
/cts/tests/tests/database/src/android/database/cts/ |
D | ContentObserverTest.java | 70 final long timeout = 1000L; in testContentObserver() local 76 assertTrue(contentObserver.hasChanged(timeout)); in testContentObserver() 84 assertTrue(contentObserver.hasChanged(timeout)); in testContentObserver() 116 final long timeout = 1000L; in testContentObserverWithUri() local 122 assertTrue(contentObserver.hasChanged(timeout)); in testContentObserverWithUri() 131 assertTrue(contentObserver.hasChanged(timeout)); in testContentObserverWithUri() 216 protected synchronized boolean hasChanged(long timeout) throws InterruptedException { in hasChanged() argument 218 wait(timeout); in hasChanged() 266 protected synchronized boolean hasChanged(long timeout) throws InterruptedException { in hasChanged() argument 268 wait(timeout); in hasChanged()
|