use of com.android.dialer.calldetails.CallDetailsEntries.CallDetailsEntry in project android_packages_apps_Dialer by LineageOS.
the class CallLogAdapter method generateAndMapNewCallDetailsEntriesHistoryResults.
private static CallDetailsEntries generateAndMapNewCallDetailsEntriesHistoryResults(@Nullable String number, @NonNull CallDetailsEntries callDetailsEntries, @NonNull Map<CallDetailsEntry, List<HistoryResult>> mappedResults) {
if (number == null) {
return callDetailsEntries;
}
CallDetailsEntries.Builder mutableCallDetailsEntries = CallDetailsEntries.newBuilder();
for (CallDetailsEntry entry : callDetailsEntries.getEntriesList()) {
CallDetailsEntry.Builder newEntry = CallDetailsEntry.newBuilder().mergeFrom(entry);
List<HistoryResult> results = mappedResults.get(entry);
if (results != null) {
newEntry.addAllHistoryResults(mappedResults.get(entry));
LogUtil.v("CallLogAdapter.generateAndMapNewCallDetailsEntriesHistoryResults", "mapped %d results", newEntry.getHistoryResultsList().size());
}
mutableCallDetailsEntries.addEntries(newEntry.build());
}
return mutableCallDetailsEntries.build();
}
Aggregations