/cts/tests/appsearch/testutils/src/android/app/appsearch/testutil/ |
D | AppSearchSessionShimImpl.java | 90 SettableFuture<AppSearchResult<AppSearchSession>> future = SettableFuture.create(); in createSearchSessionAsync() local 91 appSearchManager.createSearchSession(searchContext, executor, future::set); in createSearchSessionAsync() 93 future, in createSearchSessionAsync() 107 SettableFuture<AppSearchResult<SetSchemaResponse>> future = SettableFuture.create(); in setSchemaAsync() local 108 mAppSearchSession.setSchema(request, mExecutor, mExecutor, future::set); in setSchemaAsync() 109 return Futures.transformAsync(future, this::transformResult, mExecutor); in setSchemaAsync() 115 SettableFuture<AppSearchResult<GetSchemaResponse>> future = SettableFuture.create(); in getSchemaAsync() local 116 mAppSearchSession.getSchema(mExecutor, future::set); in getSchemaAsync() 117 return Futures.transformAsync(future, this::transformResult, mExecutor); in getSchemaAsync() 123 SettableFuture<AppSearchResult<Set<String>>> future = SettableFuture.create(); in getNamespacesAsync() local [all …]
|
D | GlobalSearchSessionShimImpl.java | 72 SettableFuture<AppSearchResult<GlobalSearchSession>> future = SettableFuture.create(); in createGlobalSearchSessionAsync() local 74 appSearchManager.createGlobalSearchSession(executor, future::set); in createGlobalSearchSessionAsync() 76 future, in createGlobalSearchSessionAsync() 93 SettableFuture<AppSearchBatchResult<String, GenericDocument>> future = in getByDocumentIdAsync() local 97 new BatchResultCallbackAdapter<>(future)); in getByDocumentIdAsync() 98 return future; in getByDocumentIdAsync() 113 SettableFuture<AppSearchResult<Void>> future = SettableFuture.create(); in reportSystemUsageAsync() local 114 mGlobalSearchSession.reportSystemUsage(request, mExecutor, future::set); in reportSystemUsageAsync() 115 return Futures.transformAsync(future, this::transformResult, mExecutor); in reportSystemUsageAsync() 122 SettableFuture<AppSearchResult<GetSchemaResponse>> future = SettableFuture.create(); in getSchemaAsync() local [all …]
|
D | EnterpriseGlobalSearchSessionShimImpl.java | 68 SettableFuture<AppSearchResult<EnterpriseGlobalSearchSession>> future = SettableFuture in createEnterpriseGlobalSearchSessionAsync() local 71 appSearchManager.createEnterpriseGlobalSearchSession(executor, future::set); in createEnterpriseGlobalSearchSessionAsync() 73 future, in createEnterpriseGlobalSearchSessionAsync() 99 SettableFuture<AppSearchBatchResult<String, GenericDocument>> future = 103 new BatchResultCallbackAdapter<>(future)); 104 return future; 120 SettableFuture<AppSearchResult<GetSchemaResponse>> future = SettableFuture.create(); 121 mEnterpriseGlobalSearchSession.getSchema(packageName, databaseName, mExecutor, future::set); 122 return Futures.transformAsync(future, this::transformResult, mExecutor);
|
D | SearchResultsShimImpl.java | 53 SettableFuture<AppSearchResult<List<SearchResult>>> future = SettableFuture.create(); in getNextPageAsync() local 54 mSearchResults.getNextPage(mExecutor, future::set); in getNextPageAsync() 55 return Futures.transformAsync(future, this::transformResult, mExecutor); in getNextPageAsync()
|
D | BatchResultCallbackAdapter.java | 28 BatchResultCallbackAdapter(SettableFuture<AppSearchBatchResult<K, V>> future) { in BatchResultCallbackAdapter() argument 29 mFuture = future; in BatchResultCallbackAdapter()
|
/cts/tests/tests/media/audio/modules/audiorecordpermissiontests/src/android/media/audio/cts/audiorecordpermissiontests/ |
D | AudioRecordPermissionTests.java | 90 final var future = in testMovingFromTopToBackground_isSilenced() local 97 future.get(FUTURE_WAIT_SECS, TimeUnit.SECONDS); in testMovingFromTopToBackground_isSilenced() 108 final var future = in testMovingFromTopToSleep_isSilenced() local 115 future.get(FUTURE_WAIT_SECS, TimeUnit.SECONDS); in testMovingFromTopToSleep_isSilenced() 121 future.get(FUTURE_WAIT_SECS, TimeUnit.SECONDS); in testMovingFromTopToSleep_isSilenced() 134 final var future = in testMovingFromTopToForegroundServiceWithMicCapabilities_isNotSilenced() local 141 assertThrows(TimeoutException.class, () -> future.get(FALSE_NEG_SECS, TimeUnit.SECONDS)); in testMovingFromTopToForegroundServiceWithMicCapabilities_isNotSilenced() 153 final var future = in testMovingFromTopToForegroundServiceWithoutMicCapabilities_isSilenced() local 160 future.get(FUTURE_WAIT_SECS, TimeUnit.SECONDS); in testMovingFromTopToForegroundServiceWithoutMicCapabilities_isSilenced() 171 final var future = in testIfTargetPre34_MovingFromTopToBackground_isNotSilenced() local [all …]
|
/cts/tests/tests/security/src/android/security/cts/ |
D | StartForFutureActivity.kt | 27 future: CompletableFuture<Instrumentation.ActivityResult> in startActivityForFuture() 30 StartForFutureActivity.future = future in startActivityForFuture() 35 future!!.complete(Instrumentation.ActivityResult(resultCode, data)) in onActivityResult() 36 future = null in onActivityResult() 41 private var future: CompletableFuture<Instrumentation.ActivityResult>? = null variable
|
D | RolePermissionOverrideTest.kt | 118 val future = CallbackFuture() in addRoleHolder() constant 121 roleName, packageName, 0, user, context.mainExecutor, future in addRoleHolder() 124 assertThat(future.get(TIMEOUT_MILLIS, TimeUnit.MILLISECONDS)).isEqualTo(true) in addRoleHolder()
|
/cts/tests/tests/accounts/src/android/accounts/cts/ |
D | AbstractAuthenticatorTests.java | 80 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 …]
|
D | AccountManagerUnaffiliatedAuthenticatorTests.java | 252 AccountManagerFuture<Account[]> future = mAccountManager.getAccountsByTypeAndFeatures( in testGetAccountsByTypeAndFeatures() local 257 Account[] accounts = future.getResult(); in testGetAccountsByTypeAndFeatures() 283 AccountManagerFuture<Bundle> future = mAccountManager.startAddAccountSession( in testStartAddAccountSession() local 292 Bundle result = future.getResult(); in testStartAddAccountSession() 293 assertTrue(future.isDone()); in testStartAddAccountSession() 319 AccountManagerFuture<Bundle> future = mAccountManager.startUpdateCredentialsSession( in testStartUpdateCredentialsSession() local 327 Bundle result = future.getResult(); in testStartUpdateCredentialsSession() 328 assertTrue(future.isDone()); in testStartUpdateCredentialsSession() 357 AccountManagerFuture<Bundle> future = mAccountManager.startAddAccountSession( in testDefaultFinishSessiontWithStartAddAccountSessionImpl() local 366 Bundle result = future.getResult(); in testDefaultFinishSessiontWithStartAddAccountSessionImpl() [all …]
|
/cts/libs/deviceutillegacy/src/android/webkit/cts/ |
D | WebkitUtils.java | 61 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()
|
D | WebViewOnUiThread.java | 489 final SettableFuture<String> future = SettableFuture.create(); 490 evaluateJavascript(script, result -> future.set(result)); 491 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/ |
D | ParallelSensorOperation.java | 98 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/common/device-side/util-axt/src/com/android/compatibility/common/util/ |
D | FutureResultActivity.kt | 53 val future = CompletableFuture<Int>() in startActivityForResult() constant 54 requests[requestCode] = future in startActivityForResult() 56 return future in startActivityForResult()
|
/cts/tests/tests/webkit/src/android/webkit/cts/ |
D | WebViewRenderProcessTest.java | 108 final SettableFuture<WebViewRenderProcess> future = SettableFuture.create(); 115 future.set(result); 121 return future; 125 final SettableFuture<Boolean> future = SettableFuture.create(); 134 future.set(true); 140 return future;
|
/cts/tests/tests/voiceinteraction/src/android/voiceinteraction/cts/ |
D | VoiceInteractionRoleTest.java | 146 final CallbackFuture future = new CallbackFuture("addAssistRoleHolder"); in addAssistRoleHolder() local 150 sContext.getMainExecutor(), future); in addAssistRoleHolder() 152 assertThat(future.get(TIMEOUT_MILLIS, TimeUnit.MILLISECONDS)).isTrue(); in addAssistRoleHolder() 158 final CallbackFuture future = new CallbackFuture("removeAssistRoleHolder"); in removeAssistRoleHolder() local 161 0, Process.myUserHandle(), sContext.getMainExecutor(), future)); in removeAssistRoleHolder() 162 future.get(TIMEOUT_MILLIS, TimeUnit.MILLISECONDS); in removeAssistRoleHolder()
|
/cts/tests/tests/telephony/current/src/android/telephony/cts/ |
D | MockVisualVoicemailService.java | 33 public static void setSmsFuture(CompletableFuture<VisualVoicemailSms> future) { in setSmsFuture() argument 34 sSmsFuture = future; in setSmsFuture()
|
D | VisualVoicemailServiceTest.java | 194 CompletableFuture<VisualVoicemailSms> future = new CompletableFuture<>(); in testPermissionlessService_ignored() local 195 PermissionlessVisualVoicemailService.setSmsFuture(future); in testPermissionlessService_ignored() 203 future.get(EVENT_NOT_RECEIVED_TIMEOUT_MILLIS, TimeUnit.MILLISECONDS); in testPermissionlessService_ignored() 475 CompletableFuture<VisualVoicemailSms> future = new CompletableFuture<>(); in getSmsFromText() local 476 MockVisualVoicemailService.setSmsFuture(future); in getSmsFromText() 486 sms = future.get(EVENT_RECEIVED_TIMEOUT_MILLIS, TimeUnit.MILLISECONDS); in getSmsFromText() 496 future.get(EVENT_NOT_RECEIVED_TIMEOUT_MILLIS, TimeUnit.MILLISECONDS); in getSmsFromText() 513 CompletableFuture<VisualVoicemailSms> future = new CompletableFuture<>(); in getSmsFromData() local 514 MockVisualVoicemailService.setSmsFuture(future); in getSmsFromData() 522 sms = future.get(EVENT_RECEIVED_TIMEOUT_MILLIS, TimeUnit.MILLISECONDS); in getSmsFromData() [all …]
|
/cts/tests/inputmethod/util/src/android/view/inputmethod/cts/util/ |
D | TestActivity.java | 118 final SettableFuture<TestActivity> future = sFutureRef.getAndSet(null); in onEnterAnimationComplete() local 119 if (future != null) { in onEnterAnimationComplete() 120 future.set(this); in onEnterAnimationComplete() 390 final SettableFuture<TestActivity> future = SettableFuture.create(); in startSync() 391 sFutureRef.set(future); in startSync() 392 return future.get(WAIT_TIMEOUT_MS, TimeUnit.MILLISECONDS); in startSync()
|
/cts/tests/tests/security/src/android/security/cts/CVE_2022_20420/ |
D | CVE_2022_20420.java | 87 CompletableFuture<Boolean> future = new CompletableFuture<>(); in testDeviceAdminAppRestricted() local 91 future.complete(true); in testDeviceAdminAppRestricted() 96 future.get(TIMEOUT_MS, TimeUnit.MILLISECONDS); in testDeviceAdminAppRestricted()
|
/cts/tests/storageaccess/src/android/storageaccess/cts/ |
D | ClientActivity.kt | 39 future: CompletableFuture<Result> in startActivityForFutureResult() 44 activityResultFuture = future in startActivityForFutureResult()
|
/cts/common/device-side/bedstead/remoteframeworkclasses/src/types/main/java/com/android/bedstead/remoteframeworkclasses/ |
D | AccountManagerFutureWrapper.java | 56 AccountManagerFuture<V> future, FutureResultWriter<V> futureResultWriter) { in writeFutureResult() argument 58 futureResultWriter.onSuccess(future.getResult()); in writeFutureResult()
|
/cts/tests/tests/telecom/src/android/telecom/cts/ |
D | CallStreamingTest.java | 239 CompletableFuture<ICtsCallStreamingServiceControl> future = in getControlBinder() local 244 future.complete(android.telecom.cts.streamingtestapp in getControlBinder() 250 future.complete(null); in getControlBinder() 256 return future.get(ASYNC_TIMEOUT, TimeUnit.MILLISECONDS); in getControlBinder()
|
/cts/hostsidetests/multiuser/app/src/com/android/cts/multiuser/ |
D | AccountCreator.java | 62 final AccountManagerFuture<Bundle> future = accountManager.addAccount( in addMockAccountForCurrentUser() local 66 final Bundle result = future.getResult(); in addMockAccountForCurrentUser()
|
/cts/tests/tests/graphics/src/android/graphics/cts/ |
D | RenderTarget.java | 68 GenericFuture<RenderTarget> future = new GenericFuture<>(); in create() local 69 Message.obtain(sHandler, CREATE_SINK, future).sendToTarget(); in create() 71 return future.get(); in create()
|