Home
last modified time | relevance | path

Searched refs:consumer (Results 1 – 25 of 54) sorted by relevance

123

/packages/apps/DocumentsUI/tests/functional/com/android/documentsui/inspector/
DDocumentLoaderTest.java102 LatchedConsumer<DocumentInfo> consumer = new LatchedConsumer<>(1); in testLoadsDocument() local
103 mLoader.loadDocInfo(validUri, mUserId, consumer); in testLoadsDocument()
108 consumer.assertCalled(1000, TimeUnit.MILLISECONDS); in testLoadsDocument()
110 assertNotNull(consumer.getValue()); in testLoadsDocument()
111 assertEquals(consumer.getValue().displayName, TEST_DOC_NAME); in testLoadsDocument()
112 assertEquals(consumer.getValue().size, 0); in testLoadsDocument()
121 LatchedConsumer<DocumentInfo> consumer = new LatchedConsumer<>(1); in testInvalidInput() local
122 mLoader.loadDocInfo(invalidUri, mUserId, consumer); in testInvalidInput()
127 consumer.assertCalled(1000, TimeUnit.MILLISECONDS); in testInvalidInput()
128 assertNull(consumer.getValue()); in testInvalidInput()
[all …]
/packages/apps/QuickSearchBox/src/com/android/quicksearchbox/util/
DConsumers.java28 public static <A extends QuietlyCloseable> void consumeCloseable(Consumer<A> consumer, in consumeCloseable() argument
32 accepted = consumer.consume(value); in consumeCloseable()
39 final Consumer<A> consumer, final A value) { in consumeAsync() argument
41 consumer.consume(value); in consumeAsync()
45 consumer.consume(value); in consumeAsync()
52 final Consumer<A> consumer, final A value) { in consumeCloseableAsync() argument
54 consumeCloseable(consumer, value); in consumeCloseableAsync()
58 consumeCloseable(consumer, value); in consumeCloseableAsync()
65 final Handler handler, final Consumer<A> consumer) { in createAsyncConsumer() argument
68 consumeAsync(handler, consumer, value); in createAsyncConsumer()
[all …]
DCachedLater.java65 for (Consumer<? super A> consumer : waitingConsumers) { in store()
66 if (DBG) Log.d(TAG, "Calling consumer: " + consumer); in store()
67 consumer.consume(value); in store()
79 public void getLater(Consumer<? super A> consumer) { in getLater() argument
90 mWaitingConsumers.add(consumer); in getLater()
95 consumer.consume(value); in getLater()
DNow.java29 public void getLater(Consumer<? super C> consumer) { in getLater() argument
30 consumer.consume(getNow()); in getLater()
DSQLiteAsyncQuery.java39 public void run(SQLiteDatabase db, Consumer<A> consumer) { in run() argument
41 consumer.consume(result); in run()
DNowOrLaterWrapper.java29 public void getLater(final Consumer<? super B> consumer) { in getLater() argument
32 return consumer.consume(get(value)); in getLater()
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/users/
DRestrictedProfilePinDialogFragment.java109 public void setPin(String pin, String originalPin, Consumer<Boolean> consumer) { in setPin() argument
113 mUiThreadHandler.post(() -> consumer.accept(true)); in setPin()
118 public void deletePin(String oldPin, Consumer<Boolean> consumer) { in deletePin() argument
122 mUiThreadHandler.post(() -> consumer.accept(true)); in deletePin()
127 public void isPinCorrect(String pin, Consumer<Boolean> consumer) { in isPinCorrect() argument
131 mUiThreadHandler.post(() -> consumer.accept(isPinCorrect)); in isPinCorrect()
136 public void isPinSet(Consumer<Boolean> consumer) { in isPinSet() argument
140 mUiThreadHandler.post(() -> consumer.accept(isPinSet)); in isPinSet()
/packages/apps/QuickSearchBox/tests/src/com/android/quicksearchbox/
DIconLoaderTest.java50 AssertConsumer<Object> consumer = new AssertConsumer<Object>(); in assertNull() local
51 value.getLater(consumer); in assertNull()
52 consumer.assertNull(); in assertNull()
60 AssertConsumer<Object> consumer = new AssertConsumer<Object>(); in assertNotNull() local
61 value.getLater(consumer); in assertNotNull()
62 consumer.assertNotNull(); in assertNotNull()
/packages/apps/Settings/src/com/android/settings/fuelgauge/batteryusage/
DBatteryAppListPreferenceController.java334 consumer -> consumer.getUid() == getRealUid(consumer) ? 0 : 1)); in getCoalescedUsageList()
337 final UidBatteryConsumer consumer = uidBatteryConsumers.get(i); in getCoalescedUsageList() local
338 final int uid = getRealUid(consumer); in getCoalescedUsageList()
341 if (mBatteryUtils.shouldHideUidBatteryConsumerUnconditionally(consumer, packages)) { in getCoalescedUsageList()
345 final boolean isHidden = mBatteryUtils.shouldHideUidBatteryConsumer(consumer, packages); in getCoalescedUsageList()
354 consumer, isHidden, uid, packages, null, loadDataInBackground)); in getCoalescedUsageList()
358 existingSipper.add(consumer); in getCoalescedUsageList()
398 final UserBatteryConsumer consumer = userBatteryConsumers.get(i); in getCoalescedUsageList() local
400 consumer, /* isHidden */ true, Process.INVALID_UID, null, null, in getCoalescedUsageList()
416 private int getRealUid(UidBatteryConsumer consumer) { in getRealUid() argument
[all …]
/packages/services/Telephony/tests/src/com/android/services/telephony/rcs/
DSipDelegateControllerTest.java102 BiConsumer<ISipDelegate, Set<FeatureTagState>> consumer = in testCreateDelegate() local
104 assertNotNull(consumer); in testCreateDelegate()
107 consumer.accept(mMockSipDelegate, Collections.emptySet()); in testCreateDelegate()
128 BiConsumer<ISipDelegate, Set<FeatureTagState>> consumer = in testCreateDeniedFeatures() local
130 assertNotNull(consumer); in testCreateDeniedFeatures()
136 consumer.accept(mMockSipDelegate, deniedTags); in testCreateDeniedFeatures()
244 BiConsumer<ISipDelegate, Set<FeatureTagState>> consumer = in testChangeSupportedFeatures() local
246 assertNotNull(consumer); in testChangeSupportedFeatures()
247 consumer.accept(mMockSipDelegate, Collections.emptySet()); in testChangeSupportedFeatures()
264 BiConsumer<ISipDelegate, Set<FeatureTagState>> consumer = in createSipDelegate() local
[all …]
/packages/apps/Gallery2/src/com/android/gallery3d/data/
DMediaSet.java187 public void enumerateMediaItems(ItemConsumer consumer) { in enumerateMediaItems() argument
188 enumerateMediaItems(consumer, 0); in enumerateMediaItems()
191 public void enumerateTotalMediaItems(ItemConsumer consumer) { in enumerateTotalMediaItems() argument
192 enumerateTotalMediaItems(consumer, 0); in enumerateTotalMediaItems()
202 protected int enumerateMediaItems(ItemConsumer consumer, int startIndex) { in enumerateMediaItems() argument
210 consumer.consume(startIndex + start + i, item); in enumerateMediaItems()
220 ItemConsumer consumer, int startIndex) { in enumerateTotalMediaItems() argument
222 start += enumerateMediaItems(consumer, startIndex); in enumerateTotalMediaItems()
226 consumer, startIndex + start); in enumerateTotalMediaItems()
DClusterAlbum.java83 ItemConsumer consumer = new ItemConsumer() { in getMediaItemFromPath() local
89 dataManager.mapMediaItems(subset, consumer, 0); in getMediaItemFromPath()
98 protected int enumerateMediaItems(ItemConsumer consumer, int startIndex) { in enumerateMediaItems() argument
99 mDataManager.mapMediaItems(mPaths, consumer, startIndex); in enumerateMediaItems()
128 ItemConsumer consumer = new ItemConsumer() { in delete() local
136 mDataManager.mapMediaItems(mPaths, consumer, 0); in delete()
DLocalSource.java192 public void mapMediaItems(ArrayList<PathId> list, ItemConsumer consumer) { in mapMediaItems() argument
208 processMapMediaItems(imageList, consumer, true); in mapMediaItems()
209 processMapMediaItems(videoList, consumer, false); in mapMediaItems()
213 ItemConsumer consumer, boolean isImage) { in processMapMediaItems() argument
239 consumer.consume(pid2.id, items[k - i]); in processMapMediaItems()
/packages/apps/Launcher3/quickstep/tests/src/com/android/quickstep/util/
DSplitSelectStateControllerTest.kt106 val consumer = in activeTasks_noMatchingTasks() constant
116 consumer.accept(tasks) in activeTasks_noMatchingTasks()
157 val consumer = in activeTasks_singleMatchingTask() constant
167 consumer.accept(tasks) in activeTasks_singleMatchingTask()
196 val consumer = in activeTasks_skipTaskWithDifferentUser() constant
206 consumer.accept(tasks) in activeTasks_skipTaskWithDifferentUser()
250 val consumer = in activeTasks_findTaskAsNonPrimaryUser() constant
260 consumer.accept(tasks) in activeTasks_findTaskAsNonPrimaryUser()
301 val consumer = in activeTasks_multipleMatchMostRecentTask() constant
311 consumer.accept(tasks) in activeTasks_multipleMatchMostRecentTask()
/packages/apps/Settings/src/com/android/settings/fuelgauge/batterytip/detectors/
DHighUsageDetector.java85 for (UidBatteryConsumer consumer : uidBatteryConsumers) { in detect()
87 consumer.getConsumedPower(), totalPower, dischargeAmount); in detect()
89 || mBatteryUtils.shouldHideUidBatteryConsumer(consumer)) { in detect()
95 .setUid(consumer.getUid()) in detect()
97 mBatteryUtils.getPackageName(consumer.getUid())) in detect()
/packages/apps/QuickSearchBox/src/com/android/quicksearchbox/
DQueryTask.java51 Handler handler, Consumer<C> consumer) { in QueryTask() argument
56 mConsumer = consumer; in QueryTask()
80 Consumer<C> consumer) { in startQuery() argument
83 consumer); in startQuery()
/packages/apps/Settings/src/com/android/settings/fuelgauge/
DBatteryUtils.java196 public boolean shouldHideUidBatteryConsumer(UidBatteryConsumer consumer) { in shouldHideUidBatteryConsumer() argument
197 return shouldHideUidBatteryConsumer(consumer, in shouldHideUidBatteryConsumer()
198 mPackageManager.getPackagesForUid(consumer.getUid())); in shouldHideUidBatteryConsumer()
205 public boolean shouldHideUidBatteryConsumer(UidBatteryConsumer consumer, String[] packages) { in shouldHideUidBatteryConsumer() argument
206 return mPowerUsageFeatureProvider.isTypeSystem(consumer.getUid(), packages) in shouldHideUidBatteryConsumer()
207 || shouldHideUidBatteryConsumerUnconditionally(consumer, packages); in shouldHideUidBatteryConsumer()
214 public boolean shouldHideUidBatteryConsumerUnconditionally(UidBatteryConsumer consumer, in shouldHideUidBatteryConsumerUnconditionally() argument
216 final int uid = consumer.getUid(); in shouldHideUidBatteryConsumerUnconditionally()
226 public boolean shouldHideDevicePowerComponent(BatteryConsumer consumer, in shouldHideDevicePowerComponent() argument
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/systeminterface/
DSystemPowerControlHelperTest.java68 private void testHelperMockedFileWrite(IntSupplier consumer, String target) throws Exception { in testHelperMockedFileWrite() argument
74 assertThat(consumer.getAsInt()).isEqualTo(SUSPEND_RESULT_SUCCESS); in testHelperMockedFileWrite()
123 private void testHelperMockedFileRead(BooleanSupplier consumer, String fileContents, in testHelperMockedFileRead() argument
136 consumer.getAsBoolean()).isEqualTo(result); in testHelperMockedFileRead()
/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/batteryusage/
DBatteryEntryTest.java102 UidBatteryConsumer consumer = mock(UidBatteryConsumer.class); in createBatteryEntryForApp() local
103 when(consumer.getUid()).thenReturn(APP_UID); in createBatteryEntryForApp()
104 when(consumer.getPackageWithHighestDrain()).thenReturn(highDrainPackage); in createBatteryEntryForApp()
106 consumer, false, APP_UID, packages, packageName); in createBatteryEntryForApp()
118 UserBatteryConsumer consumer = mock(UserBatteryConsumer.class); in createUserBatteryConsumer() local
119 when(consumer.getUserId()).thenReturn(userId); in createUserBatteryConsumer()
121 consumer, false, 0, null, null); in createUserBatteryConsumer()
/packages/apps/Launcher3/quickstep/src/com/android/quickstep/util/
DCachedEventDispatcher.java51 public void setConsumer(Consumer<MotionEvent> consumer) { in setConsumer() argument
52 if (consumer == null) { in setConsumer()
55 mConsumer = consumer; in setConsumer()
/packages/services/Telephony/src/com/android/phone/settings/
DPickSmsSubscriptionActivity.java65 public static void addPendingResult(IIntegerConsumer consumer) { in addPendingResult() argument
67 sSmsPickPendingList.add(consumer); in addPendingResult()
69 Log.i(LOG_TAG, "queue pending result, token: " + consumer); in addPendingResult()
/packages/modules/Connectivity/tests/cts/hostside/app/src/com/android/cts/net/hostside/
DMyVpnService.java80 BiConsumer<InetAddress, Integer> consumer) { in parseIpAndMaskListArgument() argument
90 consumer.accept(ipAndMask.first, ipAndMask.second); in parseIpAndMaskListArgument()
97 Consumer<IpPrefix> consumer) { in parseIpPrefixListArgument() argument
99 (inetAddress, prefixLength) -> consumer.accept( in parseIpPrefixListArgument()
/packages/apps/Launcher3/quickstep/src/com/android/quickstep/
DTouchInteractionService.java750 InputConsumer consumer = new ProgressDelegateInputConsumer( in newConsumer() local
753 logInputConsumerSelectionReason(consumer, newCompoundString( in newConsumer()
756 return consumer; in newConsumer()
763 InputConsumer consumer; in newConsumer() local
767 consumer = createDeviceLockedInputConsumer( in newConsumer()
771 consumer = getDefaultInputConsumer( in newConsumer()
775 logInputConsumerSelectionReason(consumer, reasonString); in newConsumer()
776 return consumer; in newConsumer()
892 InputConsumer consumer, CompoundString reasonString) { in logInputConsumerSelectionReason() argument
894 ActiveGestureLog.INSTANCE.addLog("setInputConsumer: " + consumer.getName()); in logInputConsumerSelectionReason()
[all …]
/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/task/
DMockTask.java41 Consumer<AbstractProvisioningTask> consumer) { in MockTask() argument
43 mConsumer = requireNonNull(consumer); in MockTask()
/packages/services/Car/tests/carservice_unit_test/src/android/car/test/util/
DBlockingResultReceiverTest.java46 Thread consumer = new Thread(() -> { in testSend_andAssertCalled() local
59 consumer.start(); in testSend_andAssertCalled()

123