Home
last modified time | relevance | path

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

1234

/packages/services/Telecomm/src/com/android/server/telecom/
DPhoneAccountSuggestionHelper.java72 final CompletableFuture<List<PhoneAccountSuggestion>> future = new CompletableFuture<>(); in bindAndGetSuggestions() local
91 future.complete( in bindAndGetSuggestions()
94 future.complete( in bindAndGetSuggestions()
105 future.complete(getDefaultSuggestions(availablePhoneAccounts)); in bindAndGetSuggestions()
117 if (!future.isDone()) { in bindAndGetSuggestions()
120 future.complete(getDefaultSuggestions(availablePhoneAccounts)); in bindAndGetSuggestions()
129 future.complete(getDefaultSuggestions(availablePhoneAccounts)); in bindAndGetSuggestions()
138 if (!future.isDone()) { in bindAndGetSuggestions()
141 future.complete(getDefaultSuggestions(availablePhoneAccounts)); in bindAndGetSuggestions()
147 return future; in bindAndGetSuggestions()
/packages/apps/Dialer/java/com/android/dialer/metrics/
DFutureTimer.java75 public <T> void applyTiming(ListenableFuture<T> future, String eventName) { in applyTiming() argument
76 applyTiming(future, unused -> eventName, LogCatMode.DONT_LOG_VALUES); in applyTiming()
84 ListenableFuture<T> future, String eventName, @LogCatMode int logCatMode) { in applyTiming() argument
85 applyTiming(future, unused -> eventName, logCatMode); in applyTiming()
95 ListenableFuture<T> future, Function<T, String> eventNameFromResultFunction) { in applyTiming() argument
96 applyTiming(future, eventNameFromResultFunction, LogCatMode.DONT_LOG_VALUES); in applyTiming()
100 ListenableFuture<T> future, in applyTiming() argument
106 future, in applyTiming()
/packages/apps/Contacts/src/com/android/contacts/util/concurrent/
DFuturesUtil.java26 public static <V> ListenableFuture<V> withTimeout(final ListenableFuture<V> future, long time, in withTimeout() argument
28 return withTimeout(future, time, unit, ContactsExecutors.newHandlerExecutor(handler)); in withTimeout()
39 public static <V> ListenableFuture<V> withTimeout(final ListenableFuture<V> future, long time, in withTimeout() argument
45 didTimeout.set(!future.isDone() && !future.isCancelled()); in withTimeout()
46 future.cancel(true); in withTimeout()
50 return Futures.catchingAsync(future, Throwable.class, new AsyncFunction<Throwable, V>() { in withTimeout()
DContactsExecutors.java112 final HandlerFuture<Void> future = HandlerFuture in schedule() local
114 mHandler.postDelayed(future, unit.toMillis(delay)); in schedule()
115 return future; in schedule()
121 final HandlerFuture<V> future = new HandlerFuture<>(mHandler, delay, unit, callable); in schedule() local
122 mHandler.postDelayed(future, unit.toMillis(delay)); in schedule()
123 return future; in schedule()
/packages/apps/Dialer/java/com/android/voicemail/impl/protocol/
DVvm3Subscriber.java246 RequestFuture<String> future = RequestFuture.newFuture(); in getSelfProvisionResponse() local
249 new StringRequest(Request.Method.POST, url, future, future) { in getSelfProvisionResponse()
266 return future.get(REQUEST_TIMEOUT_SECONDS, TimeUnit.SECONDS); in getSelfProvisionResponse()
275 RequestFuture<String> future = RequestFuture.newFuture(); in clickSubscribeLink() local
278 new StringRequest(Request.Method.POST, subscribeLink, future, future); in clickSubscribeLink()
282 future.get(REQUEST_TIMEOUT_SECONDS, TimeUnit.SECONDS); in clickSubscribeLink()
304 RequestFuture<String> future = RequestFuture.newFuture(); in vvm3XmlRequest() local
306 new StringRequest(Request.Method.POST, voicemailManagementGateway, future, future) { in vvm3XmlRequest()
315 String response = future.get(REQUEST_TIMEOUT_SECONDS, TimeUnit.SECONDS); in vvm3XmlRequest()
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/
DCarLocationServiceTest.java336 CompletableFuture<Void> future = new CompletableFuture<>(); in testStoresLocationUponShutdownPrepare() local
338 mCarLocationService.onStateChanged(CarPowerStateListener.SHUTDOWN_PREPARE, future); in testStoresLocationUponShutdownPrepare()
342 assertTrue(future.isDone()); in testStoresLocationUponShutdownPrepare()
382 CompletableFuture<Void> future = new CompletableFuture<>(); in testDoesNotStoreNullLocation() local
384 mCarLocationService.onStateChanged(CarPowerStateListener.SHUTDOWN_PREPARE, future); in testDoesNotStoreNullLocation()
387 assertTrue(future.isDone()); in testDoesNotStoreNullLocation()
427 CompletableFuture<Void> future = new CompletableFuture<>(); in testDeletesCacheFileUponSuspendExitWhileMoving() local
430 mCarLocationService.onStateChanged(CarPowerStateListener.SUSPEND_EXIT, future); in testDeletesCacheFileUponSuspendExitWhileMoving()
432 assertTrue(future.isDone()); in testDeletesCacheFileUponSuspendExitWhileMoving()
447 CompletableFuture<Void> future = new CompletableFuture<>(); in testRegistersForDrivingStateChangesUponSuspendExit() local
[all …]
/packages/services/Car/service/src/com/android/car/garagemode/
DController.java75 public void onStateChanged(int state, CompletableFuture<Void> future) { in onStateChanged() argument
87 handleShutdownPrepare(future); in onStateChanged()
143 void initiateGarageMode(CompletableFuture<Void> future) { in initiateGarageMode() argument
145 mGarageMode.enterGarageMode(future); in initiateGarageMode()
187 private void handleShutdownPrepare(CompletableFuture<Void> future) { in handleShutdownPrepare() argument
188 initiateGarageMode(future); in handleShutdownPrepare()
DGarageMode.java177 void enterGarageMode(CompletableFuture<Void> future) { in enterGarageMode() argument
182 updateFuture(future); in enterGarageMode()
233 private void updateFuture(CompletableFuture<Void> future) { in updateFuture() argument
235 mFuture = future; in updateFuture()
/packages/apps/Gallery2/src/com/android/gallery3d/util/
DJobLimiter.java53 public synchronized void setFuture(Future<T> future) { in setFuture() argument
55 mDelegate = future; in setFuture()
137 JobWrapper<T> future = new JobWrapper<T>(Utils.checkNotNull(job), listener); in submit() local
138 mJobs.addLast(future); in submit()
140 return future; in submit()
155 public synchronized void onFutureDone(Future future) { in onFutureDone() argument
/packages/apps/Camera2/src/com/android/camera/one/v2/sharedimagereader/metadatasynchronizer/
DMetadataPoolImpl.java71 ListenableFuture<TotalCaptureResultProxy> future = getOrCreateFuture(timestamp); in removeMetadataFuture() local
73 Futures.addCallback(future, new FutureCallback<TotalCaptureResultProxy>() { in removeMetadataFuture()
86 return Futures2.nonCancellationPropagating(future); in removeMetadataFuture()
92 SettableFuture<TotalCaptureResultProxy> future = getOrCreateFuture(timestamp); in update() local
93 future.set(metadata); in update()
/packages/apps/Gallery2/src/com/android/gallery3d/app/
DSinglePhotoDataAdapter.java90 public void onFutureDone(Future<BitmapRegionDecoder> future) {
91 BitmapRegionDecoder decoder = future.get();
107 public void onFutureDone(Future<Bitmap> future) {
109 mHandler.obtainMessage(MSG_UPDATE_IMAGE, future));
134 private void onDecodeThumbComplete(Future<Bitmap> future) { in onDecodeThumbComplete() argument
136 Bitmap backup = future.get(); in onDecodeThumbComplete()
DPhotoDataAdapter.java295 private void updateScreenNail(Path path, Future<ScreenNail> future) { in updateScreenNail() argument
297 ScreenNail screenNail = future.get(); in updateScreenNail()
299 if (entry == null || entry.screenNailTask != future) { in updateScreenNail()
330 private void updateFullImage(Path path, Future<BitmapRegionDecoder> future) { in updateFullImage() argument
332 if (entry == null || entry.fullImageTask != future) { in updateFullImage()
333 BitmapRegionDecoder fullImage = future.get(); in updateFullImage()
339 entry.fullImage = future.get(); in updateFullImage()
861 public void onFutureDone(Future<BitmapRegionDecoder> future) { in onFutureDone() argument
862 mFuture = future; in onFutureDone()
883 public void onFutureDone(Future<ScreenNail> future) { in onFutureDone() argument
[all …]
/packages/apps/Dialer/java/com/android/dialer/common/concurrent/
DDialerFutures.java58 for (final ListenableFuture<? extends T> future : output.futures) { in firstMatchingImpl()
59 future.addListener( in firstMatchingImpl()
69 value = Futures.getDone(future); in firstMatchingImpl()
137 for (ListenableFuture<? extends T> future : localFutures) { in afterDone()
138 future.cancel(interrupt); in afterDone()
/packages/apps/Dialer/java/com/android/voicemail/impl/sms/
DStatusSmsFetcher.java60 private CompletableFuture<Bundle> future = new CompletableFuture<>(); field in StatusSmsFetcher
83 return future.get(STATUS_SMS_TIMEOUT_MILLIS, TimeUnit.MILLISECONDS); in get()
108 future.cancel(true); in onReceive()
120 future.complete(sms.getFields()); in onReceive()
140 future.complete(translatedBundle); in onReceive()
/packages/services/Car/service/src/com/android/car/
DCarLocationService.java206 public void onStateChanged(int state, CompletableFuture<Void> future) { in onStateChanged() argument
213 if (future != null) { in onStateChanged()
214 future.complete(null); in onStateChanged()
230 if (future != null) { in onStateChanged()
231 future.complete(null); in onStateChanged()
236 if (future != null) { in onStateChanged()
237 future.complete(null); in onStateChanged()
/packages/apps/Settings/tests/robotests/src/com/android/settings/accounts/
DRemoveAccountPreferenceControllerTest.java194 AccountManagerFuture<Bundle> future = mock(AccountManagerFuture.class); in confirmRemove_shouldRemoveAccount() local
197 when(future.getResult()).thenReturn(resultBundle); in confirmRemove_shouldRemoveAccount()
199 callback.run(future); in confirmRemove_shouldRemoveAccount()
227 AccountManagerFuture<Bundle> future = mock(AccountManagerFuture.class); in confirmRemove_activityGone_shouldSilentlyRemoveAccount() local
230 when(future.getResult()).thenReturn(resultBundle); in confirmRemove_activityGone_shouldSilentlyRemoveAccount()
232 callback.run(future); in confirmRemove_activityGone_shouldSilentlyRemoveAccount()
/packages/apps/DocumentsUI/tests/common/com/android/documentsui/testing/
DTestScheduledExecutorService.java121 TestFuture future = new TestFuture(command, delay, unit); in schedule() local
122 scheduled.add(future); in schedule()
123 return future; in schedule()
145 TestFuture future = scheduled.remove(scheduled.size() - 1); in runAll() local
146 future.runnable.run(); in runAll()
/packages/apps/Dialer/java/com/android/voicemail/impl/sync/
DVvmNetworkRequest.java94 private final CompletableFuture<NetworkWrapper> future = new CompletableFuture<>(); field in VvmNetworkRequest.FutureNetworkRequestCallback
104 return future; in getFuture()
110 future.complete(new NetworkWrapper(network, this)); in onAvailable()
116 future.complete(null); in onFailed()
/packages/services/Car/car-lib/src/android/car/hardware/power/
DCarPowerManager.java123 void onStateChanged(int state, CompletableFuture<Void> future); in onStateChanged() argument
215 CompletableFuture<Void> future; in setServiceForListenerLocked()
220 future = mFuture; in setServiceForListenerLocked()
223 listenerWithCompletion.onStateChanged(state, future); in setServiceForListenerLocked()
/packages/apps/DocumentsUI/src/com/android/documentsui/services/
DFileOperationService.java254 Future<?> future = getExecutorService(operation.getOpType()).submit(job); in handleOperation() local
255 mJobs.put(jobId, new JobRecord(job, future)); in handleOperation()
495 private final Future<?> future; field in FileOperationService.JobRecord
497 public JobRecord(Job job, Future<?> future) { in JobRecord() argument
499 this.future = future; in JobRecord()
/packages/apps/Car/Cluster/src/android/car/cluster/
DImageResolver.java150 CompletableFuture<Map<ImageReference, Bitmap>> future = new CompletableFuture<>(); in getBitmaps() local
162 future.complete(bitmaps); in getBitmaps()
165 future.completeExceptionally(ex); in getBitmaps()
169 return future; in getBitmaps()
/packages/modules/DnsResolver/
Dresolv_tls_unit_test.cpp183 std::future<DnsTlsTransport::Result> f = transport.query(makeSlice(QUERY)); in TEST_F()
200 std::vector<std::future<DnsTlsTransport::Result>> results; in TEST_F()
267 std::vector<std::future<DnsTlsTransport::Result>> results; in TEST_F()
286 std::vector<std::future<DnsTlsTransport::Result>> results; in TEST_F()
307 std::vector<std::future<DnsTlsTransport::Result>> results; in TEST_F()
327 std::vector<std::future<DnsTlsTransport::Result>> results; in TEST_F()
351 std::vector<std::future<DnsTlsTransport::Result>> results; in TEST_F()
379 std::vector<std::future<DnsTlsTransport::Result>> results; in TEST_F()
399 std::vector<std::future<DnsTlsTransport::Result>> results; in TEST_F()
544 std::vector<std::future<DnsTlsTransport::Result>> results; in TEST_F()
[all …]
/packages/apps/Gallery2/src/com/android/gallery3d/ui/
DBitmapLoader.java49 public void onFutureDone(Future<Bitmap> future) { in onFutureDone() argument
52 mBitmap = future.get(); in onFutureDone()
60 if (future.isCancelled() && mBitmap == null) { in onFutureDone()
DDetailsAddressResolver.java68 public void onFutureDone(final Future<Address> future) { in resolveAddress()
70 if (!future.isCancelled()) { in resolveAddress()
74 updateLocation(future.get()); in resolveAddress()
/packages/apps/Car/Settings/src/com/android/car/settings/accounts/
DAddAccountActivity.java81 public void run(AccountManagerFuture<Bundle> future) {
82 if (!future.isDone()) {
87 Bundle result = future.getResult();

1234