Search in sources :

Example 1 with RowCombiner

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;
}
Also used : ContentValues(android.content.ContentValues) DialerPhoneNumber(com.android.dialer.DialerPhoneNumber) RowCombiner(com.android.dialer.calllog.datasources.util.RowCombiner)

Aggregations

ContentValues (android.content.ContentValues)1 DialerPhoneNumber (com.android.dialer.DialerPhoneNumber)1 RowCombiner (com.android.dialer.calllog.datasources.util.RowCombiner)1