use of com.android.dialer.phonelookup.PhoneLookupInfo.Builder in project android_packages_apps_Dialer by LineageOS.
the class CompositePhoneLookup method combineSubMessageFutures.
/**
* Combines a list of sub-message futures into a future for {@link PhoneLookupInfo}.
*/
@SuppressWarnings({ "unchecked", "rawtype" })
private ListenableFuture<PhoneLookupInfo> combineSubMessageFutures(List<ListenableFuture<?>> subMessageFutures) {
return Futures.transform(Futures.allAsList(subMessageFutures), subMessages -> {
Preconditions.checkNotNull(subMessages);
Builder mergedInfo = PhoneLookupInfo.newBuilder();
for (int i = 0; i < subMessages.size(); i++) {
PhoneLookup phoneLookup = phoneLookups.get(i);
phoneLookup.setSubMessage(mergedInfo, subMessages.get(i));
}
return mergedInfo.build();
}, lightweightExecutorService);
}
Aggregations