/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()
|
D | NowOrLater.java | 41 void getLater(Consumer<? super C> consumer); in getLater() argument
|
/packages/apps/QuickSearchBox/tests/src/com/android/quicksearchbox/ |
D | MockShortcutRepository.java | 46 boolean allowWebSearchShortcuts, Consumer<ShortcutCursor> consumer) { in getShortcutsForQuery() argument 48 consumer.consume(cursor); in getShortcutsForQuery() 65 public void getCorpusScores(Consumer<Map<String, Integer>> consumer) { in getCorpusScores() argument 66 consumer.consume(mCorpusScores); in getCorpusScores() 69 public void hasHistory(Consumer<Boolean> consumer) { in hasHistory() argument 70 consumer.consume(false); in hasHistory()
|
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()
|
D | DefaultCorpusRankerTest.java | 77 ConsumerTrap<List<Corpus>> consumer = new ConsumerTrap<List<Corpus>>(); in getRankedCorpora() local 78 mRanker.getCorporaInAll(consumer); in getRankedCorpora() 79 return consumer.getValue(); in getRankedCorpora()
|
/packages/apps/QuickSearchBox/src/com/android/quicksearchbox/ |
D | QueryTask.java | 53 Handler handler, Consumer<C> consumer, boolean onlyTask) { in QueryTask() argument 58 mConsumer = consumer; in QueryTask() 81 Consumer<C> consumer, boolean onlyOneProvider) { in startQueries() argument 85 executor, handler, consumer, onlyOneProvider); in startQueries() 93 Consumer<C> consumer, boolean onlyOneProvider) { in startQuery() argument 96 consumer, onlyOneProvider); in startQuery()
|
D | ShortcutRepository.java | 38 void hasHistory(Consumer<Boolean> consumer); in hasHistory() argument 76 Consumer<ShortcutCursor> consumer); in getShortcutsForQuery() argument 97 void getCorpusScores(Consumer<Map<String,Integer>> consumer); in getCorpusScores() argument
|
D | MultiSourceCorpus.java | 140 BarrierConsumer<SourceResult> consumer = in getSuggestions() local 145 source, null, consumer, onlySource); in getSuggestions() 148 ArrayList<SourceResult> results = consumer.getValues(); in getSuggestions()
|
D | DefaultCorpusRanker.java | 61 public void getCorporaInAll(Consumer<List<Corpus>> consumer) { in getCorporaInAll() argument 62 mRankedCorpora.getLater(consumer); in getCorporaInAll()
|
D | CorpusRanker.java | 36 void getCorporaInAll(Consumer<List<Corpus>> consumer); in getCorporaInAll() argument
|
D | ShortcutRepositoryImplLog.java | 211 private <A> void runQueryAsync(final SQLiteAsyncQuery<A> query, final Consumer<A> consumer) { in runQueryAsync() argument 214 query.run(mOpenHelper.getReadableDatabase(), consumer); in runQueryAsync() 221 public void hasHistory(Consumer<Boolean> consumer) { in hasHistory() argument 227 }, consumer); in hasHistory() 270 final boolean allowWebSearchShortcuts, final Consumer<ShortcutCursor> consumer) { in getShortcutsForQuery() argument 276 Consumers.consumeCloseable(consumer, shortcuts); in getShortcutsForQuery() 285 public void getCorpusScores(final Consumer<Map<String, Integer>> consumer) { in getCorpusScores() argument 291 }, consumer); in getCorpusScores()
|
D | SearchActivity.java | 627 private void getCorporaToQuery(Consumer<List<Corpus>> consumer) { in getCorporaToQuery() argument 630 getCorpusRanker().getCorporaInAll(Consumers.createAsyncConsumer(mHandler, consumer)); in getCorporaToQuery() 635 consumer.consume(corpora); in getCorporaToQuery() 646 Consumer<ShortcutCursor> consumer = Consumers.createAsyncCloseableConsumer(mHandler, in getShortcutsForQuery() local 654 getSettings().allowWebSearchShortcuts(), consumer); in getShortcutsForQuery()
|
/packages/apps/Gallery2/src/com/android/gallery3d/data/ |
D | ClusterAlbum.java | 82 ItemConsumer consumer = new ItemConsumer() { in getMediaItemFromPath() local 87 dataManager.mapMediaItems(subset, consumer, 0); in getMediaItemFromPath() 96 protected int enumerateMediaItems(ItemConsumer consumer, int startIndex) { in enumerateMediaItems() argument 97 mDataManager.mapMediaItems(mPaths, consumer, startIndex); in enumerateMediaItems() 125 ItemConsumer consumer = new ItemConsumer() { in delete() local 132 mDataManager.mapMediaItems(mPaths, consumer, 0); in delete()
|
D | MediaSet.java | 186 public void enumerateMediaItems(ItemConsumer consumer) { in enumerateMediaItems() argument 187 enumerateMediaItems(consumer, 0); in enumerateMediaItems() 190 public void enumerateTotalMediaItems(ItemConsumer consumer) { in enumerateTotalMediaItems() argument 191 enumerateTotalMediaItems(consumer, 0); in enumerateTotalMediaItems() 201 protected int enumerateMediaItems(ItemConsumer consumer, int startIndex) { in enumerateMediaItems() argument 209 consumer.consume(startIndex + start + i, item); in enumerateMediaItems() 219 ItemConsumer consumer, int startIndex) { in enumerateTotalMediaItems() argument 221 start += enumerateMediaItems(consumer, startIndex); in enumerateTotalMediaItems() 225 consumer, startIndex + start); in enumerateTotalMediaItems()
|
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 89 consumer.consume(pid.id, (MediaItem) obj); in mapMediaItems()
|
D | FilterTypeSet.java | 126 ItemConsumer consumer = new ItemConsumer() { in delete() local 133 mDataManager.mapMediaItems(mPaths, consumer, 0); in delete()
|
D | DataManager.java | 203 public void mapMediaItems(ArrayList<Path> list, ItemConsumer consumer, in mapMediaItems() argument 225 source.mapMediaItems(entry.getValue(), consumer); in mapMediaItems() local
|