use of com.android.dialer.calllog.datasources.util.RowCombiner in project android_packages_apps_Dialer by LineageOS.
the class SystemCallLogDataSource method coalesce.
@Override
public ContentValues coalesce(List<ContentValues> individualRowsSortedByTimestampDesc) {
// TODO: Complete implementation.
ContentValues coalescedValues = new RowCombiner(individualRowsSortedByTimestampDesc).useMostRecentLong(AnnotatedCallLog.TIMESTAMP).combine();
// All phone numbers in the provided group should be equivalent (but could be formatted
// differently). Arbitrarily show the raw phone number of the most recent call.
DialerPhoneNumber mostRecentPhoneNumber = getMostRecentPhoneNumber(individualRowsSortedByTimestampDesc);
coalescedValues.put(CoalescedAnnotatedCallLog.FORMATTED_NUMBER, mostRecentPhoneNumber.getRawInput().getNumber());
return coalescedValues;
}
Aggregations