Home
last modified time | relevance | path

Searched refs:supplier (Results 1 – 19 of 19) sorted by relevance

/frameworks/base/services/tests/uiservicestests/src/com/android/server/slice/
DPackageMatchingCacheTest.java42 private final Supplier<String> supplier = mock(Supplier.class); field in PackageMatchingCacheTest
43 private final PackageMatchingCache cache = new PackageMatchingCache(supplier);
49 verify(supplier, never()).get(); in testNulls()
53 verify(supplier).get(); in testNulls()
58 when(supplier.get()).thenReturn("ret.pkg"); in testCaching()
64 verify(supplier, times(1)).get(); in testCaching()
69 when(supplier.get()).thenReturn("ret.pkg"); in testGetOnFailure()
72 when(supplier.get()).thenReturn("other.pkg"); in testGetOnFailure()
74 verify(supplier, times(2)).get(); in testGetOnFailure()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/
DExtensionControllerImpl.java118 Supplier<T> supplier) { in withUiMode() argument
119 mExtension.addUiMode(uiMode, supplier); in withUiMode()
125 Supplier<T> supplier) { in withFeature() argument
126 mExtension.addFeature(feature, supplier); in withFeature()
307 public UiModeItem(int uiMode, Supplier<T> supplier) { in UiModeItem() argument
309 mSupplier = supplier; in UiModeItem()
345 public FeatureItem(String feature, Supplier<T> supplier) { in FeatureItem() argument
346 mSupplier = supplier; in FeatureItem()
370 public Default(Supplier<T> supplier) { in Default() argument
371 mSupplier = supplier; in Default()
/frameworks/base/apct-tests/perftests/utils/src/android/perftests/utils/
DTestUtils.java38 public static <T> T getOnMainSync(@NonNull Supplier<T> supplier) { in getOnMainSync() argument
41 instrumentation.runOnMainSync(() -> result.set(supplier.get())); in getOnMainSync()
/frameworks/base/services/core/java/com/android/server/location/contexthub/
DContextHubClientBroker.java511 Supplier<Intent> supplier = in sendMessageToClient() local
514 sendPendingIntent(supplier, nanoAppId); in sendMessageToClient()
560 Supplier<Intent> supplier = in onNanoAppAborted() local
563 sendPendingIntent(supplier, nanoAppId); in onNanoAppAborted()
749 Supplier<Intent> supplier = in sendAuthStateCallback() local
752 sendPendingIntent(supplier, nanoAppId); in sendAuthStateCallback()
803 private synchronized void sendPendingIntent(Supplier<Intent> supplier) { in sendPendingIntent() argument
805 doSendPendingIntent(mPendingIntentRequest.getPendingIntent(), supplier.get()); in sendPendingIntent()
815 private synchronized void sendPendingIntent(Supplier<Intent> supplier, long nanoAppId) { in sendPendingIntent() argument
818 doSendPendingIntent(mPendingIntentRequest.getPendingIntent(), supplier.get()); in sendPendingIntent()
/frameworks/libs/net/common/testutils/devicetests/com/android/testutils/
DTestPermissionUtil.kt51 supplier: ThrowingSupplier<T> in runAsShell()
52 ): T = runAsShell(*getNonEmptyVarargs(perm1, perm2, perm3)) { supplier.get() } in runAsShell()
/frameworks/base/packages/SystemUI/src/com/android/systemui/
DDejankUtils.java201 public static <T> T whitelistIpcs(Supplier<T> supplier) { in whitelistIpcs() argument
208 val = supplier.get(); in whitelistIpcs()
216 return supplier.get(); in whitelistIpcs()
/frameworks/base/services/robotests/backup/src/com/android/server/backup/remote/
DRemoteCallTest.java252 private static <T> Future<T> runInWorkerThreadAsync(Callable<T> supplier) { in runInWorkerThreadAsync() argument
254 new Thread(() -> future.complete(uncheck(supplier)), "test-worker-thread").start(); in runInWorkerThreadAsync()
258 private static <T> T runInWorkerThread(Callable<T> supplier) throws Exception { in runInWorkerThread() argument
259 return runInWorkerThreadAsync(supplier).get(); in runInWorkerThread()
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/testables/
DStaticMockFixtureRule.java71 public StaticMockFixtureRule(Supplier<? extends StaticMockFixture>... supplier) { in StaticMockFixtureRule() argument
73 mSupplier = supplier; in StaticMockFixtureRule()
/frameworks/base/core/java/com/android/internal/infra/
DAndroidFuture.java477 public static <T> AndroidFuture<T> supply(Supplier<T> supplier) { in supply() argument
478 return supplyAsync(supplier, DIRECT_EXECUTOR); in supply()
484 public static <T> AndroidFuture<T> supplyAsync(Supplier<T> supplier, Executor executor) { in supplyAsync() argument
485 return new SupplyAsync<>(supplier, executor); in supplyAsync()
491 SupplyAsync(Supplier<T> supplier, Executor executor) { in SupplyAsync() argument
492 mSupplier = supplier; in SupplyAsync()
/frameworks/base/core/tests/coretests/src/android/widget/
DRemoteViewsAdapterTest.java225 private <T> T getOnUiThread(Supplier<T> supplier) throws Throwable { in getOnUiThread() argument
226 return getOnHandler(mMainHandler, supplier); in getOnUiThread()
235 private static <T> T getOnHandler(Handler handler, Supplier<T> supplier) throws Throwable { in getOnHandler() argument
237 handler.post(() -> result.set(supplier.get())); in getOnHandler()
/frameworks/base/startop/iorap/functional_tests/src/com/google/android/startop/iorap/
DIorapWorkFlowTest.java346 private boolean retryWithTimeout(Duration timeout, BooleanSupplier supplier) throws Exception {
350 if (supplier.getAsBoolean()) {
/frameworks/base/startop/iorap/src/com/google/android/startop/iorap/
DIorapForwardingService.java641 private boolean retryWithTimeout(final Duration timeout, BooleanSupplier supplier) {
645 if (supplier.getAsBoolean()) {
/frameworks/base/services/robotests/backup/src/com/android/server/backup/transport/
DTransportClientTest.java526 private <T> T runInWorkerThread(Supplier<T> supplier) throws Exception { in runInWorkerThread() argument
528 mWorkerHandler.post(() -> future.complete(supplier.get())); in runInWorkerThread()
/frameworks/base/core/java/android/app/
DResourcesManager.java975 final ApkAssetsSupplier supplier = new ApkAssetsSupplier(); in createApkAssetsSupplierNotLocked() local
980 supplier.load(apkKey); in createApkAssetsSupplierNotLocked()
985 return supplier; in createApkAssetsSupplierNotLocked()
/frameworks/base/services/core/java/com/android/server/rollback/
DRollbackManagerServiceImpl.java301 private <U> U awaitResult(Supplier<U> supplier) { in awaitResult() argument
304 return CompletableFuture.supplyAsync(supplier, mExecutor).get(); in awaitResult()
/frameworks/base/tests/PackageWatchdog/src/com/android/server/
DPackageWatchdogTest.java115 private boolean retry(Supplier<Boolean> supplier) throws Exception { in retry() argument
117 if (supplier.get()) { in retry()
/frameworks/base/services/core/java/com/android/server/audio/
DAudioService.java657 @NonNull String id, @Nullable BooleanSupplier supplier) { in queueRestoreWithRemovalIfTrue() argument
660 if (supplier != null) { in queueRestoreWithRemovalIfTrue()
661 mMap.put(id, supplier); in queueRestoreWithRemovalIfTrue()
/frameworks/base/core/java/android/widget/
DTextView.java12896 final Supplier<TextClassification> supplier = () -> in handleClick() local
12914 CompletableFuture.supplyAsync(supplier) in handleClick()
/frameworks/base/config/
Dboot-image-profile.txt30037 HSPLjava/util/stream/Collectors$CollectorImpl;->supplier()Ljava/util/function/Supplier;