/packages/apps/DocumentsUI/tests/functional/com/android/documentsui/inspector/ |
D | DocumentLoaderTest.java | 102 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/ |
D | Consumers.java | 28 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 …]
|
D | CachedLater.java | 65 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()
|
D | Now.java | 29 public void getLater(Consumer<? super C> consumer) { in getLater() argument 30 consumer.consume(getNow()); in getLater()
|
D | SQLiteAsyncQuery.java | 39 public void run(SQLiteDatabase db, Consumer<A> consumer) { in run() argument 41 consumer.consume(result); in run()
|
D | NowOrLaterWrapper.java | 29 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/ |
D | RestrictedProfilePinDialogFragment.java | 109 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/Settings/src/com/android/settings/fuelgauge/ |
D | BatteryAppListPreferenceController.java | 312 consumer -> consumer.getUid() == getRealUid(consumer) ? 0 : 1)); in getCoalescedUsageList() 315 final UidBatteryConsumer consumer = uidBatteryConsumers.get(i); in getCoalescedUsageList() local 316 final int uid = getRealUid(consumer); in getCoalescedUsageList() 319 if (mBatteryUtils.shouldHideUidBatteryConsumerUnconditionally(consumer, packages)) { in getCoalescedUsageList() 323 final boolean isHidden = mBatteryUtils.shouldHideUidBatteryConsumer(consumer, packages); in getCoalescedUsageList() 332 consumer, isHidden, uid, packages, null, loadDataInBackground)); in getCoalescedUsageList() 336 existingSipper.add(consumer); in getCoalescedUsageList() 376 final UserBatteryConsumer consumer = userBatteryConsumers.get(i); in getCoalescedUsageList() local 378 consumer, /* isHidden */ true, Process.INVALID_UID, null, null, in getCoalescedUsageList() 394 private int getRealUid(UidBatteryConsumer consumer) { in getRealUid() argument [all …]
|
D | BatteryUtils.java | 171 public boolean shouldHideUidBatteryConsumer(UidBatteryConsumer consumer) { in shouldHideUidBatteryConsumer() argument 172 return shouldHideUidBatteryConsumer(consumer, in shouldHideUidBatteryConsumer() 173 mPackageManager.getPackagesForUid(consumer.getUid())); in shouldHideUidBatteryConsumer() 180 public boolean shouldHideUidBatteryConsumer(UidBatteryConsumer consumer, String[] packages) { in shouldHideUidBatteryConsumer() argument 181 return mPowerUsageFeatureProvider.isTypeSystem(consumer.getUid(), packages) in shouldHideUidBatteryConsumer() 182 || shouldHideUidBatteryConsumerUnconditionally(consumer, packages); in shouldHideUidBatteryConsumer() 189 boolean shouldHideUidBatteryConsumerUnconditionally(UidBatteryConsumer consumer, in shouldHideUidBatteryConsumerUnconditionally() argument 191 return consumer.getUid() < 0 || isHiddenSystemModule(packages); in shouldHideUidBatteryConsumerUnconditionally() 198 public boolean shouldHideDevicePowerComponent(BatteryConsumer consumer, in shouldHideDevicePowerComponent() argument
|
/packages/services/Telephony/tests/src/com/android/services/telephony/rcs/ |
D | SipDelegateControllerTest.java | 101 BiConsumer<ISipDelegate, Set<FeatureTagState>> consumer = in testCreateDelegate() local 103 assertNotNull(consumer); in testCreateDelegate() 106 consumer.accept(mMockSipDelegate, Collections.emptySet()); in testCreateDelegate() 126 BiConsumer<ISipDelegate, Set<FeatureTagState>> consumer = in testCreateDeniedFeatures() local 128 assertNotNull(consumer); in testCreateDeniedFeatures() 134 consumer.accept(mMockSipDelegate, deniedTags); in testCreateDeniedFeatures() 242 BiConsumer<ISipDelegate, Set<FeatureTagState>> consumer = in testChangeSupportedFeatures() local 244 assertNotNull(consumer); in testChangeSupportedFeatures() 245 consumer.accept(mMockSipDelegate, Collections.emptySet()); in testChangeSupportedFeatures() 260 BiConsumer<ISipDelegate, Set<FeatureTagState>> consumer = in createSipDelegate() local [all …]
|
/packages/apps/Gallery2/src/com/android/gallery3d/data/ |
D | MediaSet.java | 187 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()
|
D | ClusterAlbum.java | 83 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()
|
D | LocalSource.java | 192 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()
|
D | MediaSource.java | 76 public void mapMediaItems(ArrayList<PathId> list, ItemConsumer consumer) { in mapMediaItems() argument 92 consumer.consume(pid.id, (MediaItem) obj); in mapMediaItems()
|
/packages/apps/QuickSearchBox/tests/src/com/android/quicksearchbox/ |
D | IconLoaderTest.java | 50 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/batterytip/detectors/ |
D | HighUsageDetector.java | 82 for (UidBatteryConsumer consumer : uidBatteryConsumers) { in detect() 84 consumer.getConsumedPower(), totalPower, dischargeAmount); in detect() 86 || mBatteryUtils.shouldHideUidBatteryConsumer(consumer)) { in detect() 92 .setUid(consumer.getUid()) in detect() 94 mBatteryUtils.getPackageName(consumer.getUid())) in detect()
|
/packages/apps/QuickSearchBox/src/com/android/quicksearchbox/ |
D | QueryTask.java | 51 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/Car/libs/car-apps-common/src/com/android/car/apps/common/imaging/ |
D | LocalImageFetcher.java | 127 public void getImage(Context context, ImageKey key, BiConsumer<ImageKey, Drawable> consumer) { in getImage() argument 130 consumer.accept(key, cached); in getImage() 144 consumers.add(consumer); in getImage() 163 public void cancelRequest(ImageKey key, BiConsumer<ImageKey, Drawable> consumer) { in cancelRequest() argument 166 boolean removed = consumers.remove(consumer); in cancelRequest() 202 for (BiConsumer<ImageKey, Drawable> consumer : consumers) { in fulfilRequests() 203 consumer.accept(key, drawable); in fulfilRequests()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/ |
D | BatteryEntryTest.java | 96 UidBatteryConsumer consumer = mock(UidBatteryConsumer.class); in createBatteryEntryForApp() local 97 when(consumer.getUid()).thenReturn(APP_UID); in createBatteryEntryForApp() 98 when(consumer.getPackageWithHighestDrain()).thenReturn(highDrainPackage); in createBatteryEntryForApp() 100 consumer, false, APP_UID, packages, packageName); in createBatteryEntryForApp() 112 UserBatteryConsumer consumer = mock(UserBatteryConsumer.class); in createUserBatteryConsumer() local 113 when(consumer.getUserId()).thenReturn(userId); in createUserBatteryConsumer() 115 consumer, false, 0, null, null); in createUserBatteryConsumer()
|
/packages/apps/Launcher3/quickstep/src/com/android/quickstep/util/ |
D | CachedEventDispatcher.java | 51 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/ |
D | PickSmsSubscriptionActivity.java | 64 public static void addPendingResult(IIntegerConsumer consumer) { in addPendingResult() argument 66 sSmsPickPendingList.add(consumer); in addPendingResult() 68 Log.i(LOG_TAG, "queue pending result, token: " + consumer); in addPendingResult()
|
/packages/apps/Launcher3/src/com/android/launcher3/testing/ |
D | TestLogging.java | 55 static void setEventConsumer(BiConsumer<String, String> consumer) { in setEventConsumer() argument 56 sEventConsumer = consumer; in setEventConsumer()
|
/packages/services/Car/tests/carservice_unit_test/src/android/car/test/util/ |
D | BlockingResultReceiverTest.java | 46 Thread consumer = new Thread(() -> { in testSend_andAssertCalled() local 59 consumer.start(); in testSend_andAssertCalled()
|
/packages/modules/NetworkStack/common/networkstackclient/src/android/net/networkstack/ |
D | NetworkStackClientBase.java | 138 for (Consumer<INetworkStackConnector> consumer : requests) { in onNetworkStackConnected() 139 consumer.accept(connector); in onNetworkStackConnected()
|
/packages/apps/Settings/src/com/android/settings/applications/appinfo/ |
D | AppBatteryPreferenceController.java | 293 final UidBatteryConsumer consumer = usageList.get(i); 294 if (consumer.getUid() == uid) { 295 return consumer;
|