Home
last modified time | relevance | path

Searched refs:future (Results 1 – 17 of 17) sorted by relevance

/cts/tests/tests/accounts/src/android/accounts/cts/
DAbstractAuthenticatorTests.java80 AccountManagerFuture<Bundle> future = mAccountManager.startAddAccountSession( in testStartAddAccountSessionDefaultImpl() local
89 Bundle result = future.getResult(); in testStartAddAccountSessionDefaultImpl()
116 AccountManagerFuture<Bundle> future = mAccountManager.startUpdateCredentialsSession( in testStartUpdateCredentialsSessionDefaultImpl() local
124 Bundle result = future.getResult(); in testStartUpdateCredentialsSessionDefaultImpl()
125 assertTrue(future.isDone()); in testStartUpdateCredentialsSessionDefaultImpl()
156 AccountManagerFuture<Bundle> future = mAccountManager.startAddAccountSession( in testFinishSessionAndStartAddAccountSessionDefaultImpl() local
165 Bundle result = future.getResult(); in testFinishSessionAndStartAddAccountSessionDefaultImpl()
166 assertTrue(future.isDone()); in testFinishSessionAndStartAddAccountSessionDefaultImpl()
174 future = mAccountManager.finishSession( in testFinishSessionAndStartAddAccountSessionDefaultImpl()
180 result = future.getResult(); in testFinishSessionAndStartAddAccountSessionDefaultImpl()
[all …]
DAccountManagerUnaffiliatedAuthenticatorTests.java254 AccountManagerFuture<Account[]> future = mAccountManager.getAccountsByTypeAndFeatures( in testGetAccountsByTypeAndFeatures() local
259 Account[] accounts = future.getResult(); in testGetAccountsByTypeAndFeatures()
285 AccountManagerFuture<Bundle> future = mAccountManager.startAddAccountSession( in testStartAddAccountSession() local
294 Bundle result = future.getResult(); in testStartAddAccountSession()
295 assertTrue(future.isDone()); in testStartAddAccountSession()
323 AccountManagerFuture<Bundle> future = mAccountManager.startUpdateCredentialsSession( in testStartUpdateCredentialsSession() local
331 Bundle result = future.getResult(); in testStartUpdateCredentialsSession()
332 assertTrue(future.isDone()); in testStartUpdateCredentialsSession()
364 AccountManagerFuture<Bundle> future = mAccountManager.startAddAccountSession( in testDefaultFinishSessiontWithStartAddAccountSessionImpl() local
373 Bundle result = future.getResult(); in testDefaultFinishSessiontWithStartAddAccountSessionImpl()
[all …]
/cts/libs/deviceutillegacy/src/android/webkit/cts/
DWebkitUtils.java61 final SettableFuture<T> future = SettableFuture.create(); in onMainThread() local
66 future.set(callable.call()); in onMainThread()
68 future.setException(t); in onMainThread()
72 return future; in onMainThread()
141 public static <T> T waitForFuture(Future<T> future) { in waitForFuture() argument
143 return future.get(TEST_TIMEOUT_MS, TimeUnit.MILLISECONDS); in waitForFuture()
DWebViewOnUiThread.java487 final SettableFuture<String> future = SettableFuture.create();
488 evaluateJavascript(script, result -> future.set(result));
489 return WebkitUtils.waitForFuture(future);
567 final SettableFuture<Void> future = SettableFuture.create();
571 future.set(null);
574 WebkitUtils.waitForFuture(future);
/cts/tests/sensor/src/android/hardware/cts/helpers/sensoroperations/
DParallelSensorOperation.java98 Future<SensorOperation> future = executor.submit(new Callable<SensorOperation>() { in execute() local
105 futures.add(future); in execute()
118 Future<SensorOperation> future = futures.get(i); in execute() local
120 SensorOperation operation = getFutureResult(future, executionTimeNs); in execute()
131 future.cancel(true /* mayInterruptIfRunning */); in execute()
164 private SensorOperation getFutureResult(Future<SensorOperation> future, Long timeoutNs) in getFutureResult() argument
167 return future.get(); in getFutureResult()
171 return future.get(waitTimeNs, TimeUnit.NANOSECONDS); in getFutureResult()
/cts/tests/tests/webkit/src/android/webkit/cts/
DWebViewRenderProcessTest.java71 final SettableFuture<WebViewRenderProcess> future = SettableFuture.create();
78 future.set(result);
84 return future;
88 final SettableFuture<Boolean> future = SettableFuture.create();
97 future.set(true);
103 return future;
DWebViewTest.java1344 public Future<Integer> future() { in future() method in WebViewTest.WaitForFindResultsListener
1388 assertEquals(2, (int)WebkitUtils.waitForFuture(l.future())); in testFindAll()
1410 WebkitUtils.waitForFuture(l.future()); in testFindNext()
1467 public Future<Integer> future() { in testDocumentHasImages() method in WebViewTest.DocumentHasImageCheckHandler
1484 assertFalse(handler.future().isDone()); in testDocumentHasImages()
1487 assertEquals(1, (int)WebkitUtils.waitForFuture(handler.future())); in testDocumentHasImages()
1790 public Future<Void> future() { in testRequestImageRef() method in WebViewTest.ImageLoaded
1817 WebkitUtils.waitForFuture(imageLoaded.future()); in testRequestImageRef()
2206 final SettableFuture<Void> future = SettableFuture.create(); in testSetWebChromeClient() local
2211 future.set(null); in testSetWebChromeClient()
[all …]
/cts/tests/tests/role/src/android/app/role/cts/
DRoleManagerTest.java462 ListenerFuture future = new ListenerFuture(); in assertOnRoleHoldersChangedListenerIsNotified() local
465 sContext.getMainExecutor(), future, user)); in assertOnRoleHoldersChangedListenerIsNotified() local
469 result = future.get(TIMEOUT_MILLIS, TimeUnit.MILLISECONDS); in assertOnRoleHoldersChangedListenerIsNotified()
472 sRoleManager.removeOnRoleHoldersChangedListenerAsUser(future, user)); in assertOnRoleHoldersChangedListenerIsNotified()
482 ListenerFuture future = new ListenerFuture(); in addAndRemoveOnRoleHoldersChangedListenerAndAddRoleHolderThenIsNotNotified() local
485 sRoleManager.addOnRoleHoldersChangedListenerAsUser(sContext.getMainExecutor(), future, in addAndRemoveOnRoleHoldersChangedListenerAndAddRoleHolderThenIsNotNotified() local
487 sRoleManager.removeOnRoleHoldersChangedListenerAsUser(future, user); in addAndRemoveOnRoleHoldersChangedListenerAndAddRoleHolderThenIsNotNotified()
492 future.get(UNEXPECTED_TIMEOUT_MILLIS, TimeUnit.MILLISECONDS); in addAndRemoveOnRoleHoldersChangedListenerAndAddRoleHolderThenIsNotNotified()
596 CallbackFuture future = new CallbackFuture(); in addRoleHolder() local
598 packageName, 0, Process.myUserHandle(), sContext.getMainExecutor(), future)); in addRoleHolder()
[all …]
/cts/tests/tests/telephony/current/src/android/telephony/cts/
DMockVisualVoicemailService.java33 public static void setSmsFuture(CompletableFuture<VisualVoicemailSms> future) { in setSmsFuture() argument
34 sSmsFuture = future; in setSmsFuture()
DVisualVoicemailServiceTest.java162 CompletableFuture<VisualVoicemailSms> future = new CompletableFuture<>(); in testPermissionlessService_ignored() local
163 PermissionlessVisualVoicemailService.setSmsFuture(future); in testPermissionlessService_ignored()
171 future.get(EVENT_NOT_RECEIVED_TIMEOUT_MILLIS, TimeUnit.MILLISECONDS); in testPermissionlessService_ignored()
523 CompletableFuture<VisualVoicemailSms> future = new CompletableFuture<>(); in getSmsFromText() local
524 MockVisualVoicemailService.setSmsFuture(future); in getSmsFromText()
534 sms = future.get(EVENT_RECEIVED_TIMEOUT_MILLIS, TimeUnit.MILLISECONDS); in getSmsFromText()
544 future.get(EVENT_NOT_RECEIVED_TIMEOUT_MILLIS, TimeUnit.MILLISECONDS); in getSmsFromText()
562 CompletableFuture<VisualVoicemailSms> future = new CompletableFuture<>(); in getSmsFromData() local
563 MockVisualVoicemailService.setSmsFuture(future); in getSmsFromData()
571 sms = future.get(EVENT_RECEIVED_TIMEOUT_MILLIS, TimeUnit.MILLISECONDS); in getSmsFromData()
[all …]
/cts/tests/tests/graphics/src/android/graphics/cts/
DRenderTarget.java68 GenericFuture<RenderTarget> future = new GenericFuture<>(); in create() local
69 Message.obtain(sHandler, CREATE_SINK, future).sendToTarget(); in create()
71 return future.get(); in create()
/cts/tests/tests/security/src/android/security/cts/
DRenderTarget.java71 GenericFuture<RenderTarget> future = new GenericFuture<>(); in create() local
72 Message.obtain(sHandler, CREATE_SINK, future).sendToTarget(); in create()
74 return future.get(); in create()
/cts/tests/tests/media/src/android/media/cts/
DMediaPlayerFlakyNetworkTest.java226 FutureTask<MediaPlayer> future = new FutureTask<MediaPlayer>(callable); in createMediaPlayerOnMainThread() local
227 getInstrumentation().runOnMainSync(future); in createMediaPlayerOnMainThread()
228 return future.get(); in createMediaPlayerOnMainThread()
/cts/tests/tests/text/src/android/text/cts/
DEmojiTest.java311 final SettableFuture<Void> future = SettableFuture.create(); in capture() local
315 future.set(null); in capture()
319 future.get(TEST_TIMEOUT_MS, TimeUnit.MILLISECONDS); in capture()
/cts/tests/tests/net/src/android/net/cts/
DLocalSocketTest.java437 Future<Result> future = service.submit(callable); in runInSeparateThread() local
438 Result result = future.get(allowedTime, TimeUnit.MILLISECONDS); in runInSeparateThread()
439 if (!future.isDone()) { in runInSeparateThread()
/cts/tests/tests/permission/src/android/permission/cts/
DFileSystemPermissionTest.java897 Future<Boolean> future = null; in tryFileOpenRead() local
901 future = executor.submit(readFile); in tryFileOpenRead()
904 completed = future.get(3, TimeUnit.SECONDS); in tryFileOpenRead()
914 if (future != null) { in tryFileOpenRead()
915 future.cancel(true); in tryFileOpenRead()
/cts/tests/tests/keystore/src/android/keystore/cts/
DKeyPairGeneratorTest.java1715 Future<Certificate[]> future = executor.submit(new Callable<Certificate[]>() { in assertSSLConnectionWithClientAuth() local
1730 Certificate[] usedClientCerts = future.get(); in assertSSLConnectionWithClientAuth()