From ff88f7bbe07fb3e267af49427adf1a91e3fc21e9 Mon Sep 17 00:00:00 2001 From: zachh Date: Tue, 9 Jan 2018 17:29:06 -0800 Subject: Added RealtimeRowProcessor. This is for performing work inside of the call log's RecyclerView, when the view holder is bound. Most of the time, this should be a no-op but there are possible edge cases where the call log data cannot be updated efficiently through the standard batch mechanism. One example of this is when there are too many invalid numbers in the call log; the CP2 information for invalid numbers cannot be efficiently batch updated so we fetch this information at display time. (Note that we do handle up to 5 invalid numbers in the batch update mechanism, but if there are more than that we fallback to this realtime processing.) Test: unit, manual PiperOrigin-RevId: 181400016 Change-Id: Iea6b380742e757b48d19f319fe46dc5fae837604 --- .../dialer/calllog/datasources/phonelookup/PhoneLookupDataSource.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'java/com/android/dialer/calllog/datasources') diff --git a/java/com/android/dialer/calllog/datasources/phonelookup/PhoneLookupDataSource.java b/java/com/android/dialer/calllog/datasources/phonelookup/PhoneLookupDataSource.java index 6ec11ad13..935ea7406 100644 --- a/java/com/android/dialer/calllog/datasources/phonelookup/PhoneLookupDataSource.java +++ b/java/com/android/dialer/calllog/datasources/phonelookup/PhoneLookupDataSource.java @@ -276,6 +276,7 @@ public final class PhoneLookupDataSource .useMostRecentLong(AnnotatedCallLog.PHOTO_ID) .useMostRecentString(AnnotatedCallLog.LOOKUP_URI) .useMostRecentInt(AnnotatedCallLog.CAN_REPORT_AS_INVALID_NUMBER) + .useMostRecentInt(AnnotatedCallLog.CP2_INFO_INCOMPLETE) .combine(); } @@ -582,6 +583,8 @@ public final class PhoneLookupDataSource contentValues.put( AnnotatedCallLog.CAN_REPORT_AS_INVALID_NUMBER, PhoneLookupSelector.canReportAsInvalidNumber(phoneLookupInfo)); + contentValues.put( + AnnotatedCallLog.CP2_INFO_INCOMPLETE, phoneLookupInfo.getCp2Info().getIsIncomplete()); } private static Uri numberUri(String number) { -- cgit v1.2.3