summaryrefslogtreecommitdiff
path: root/java/com/android/dialer/calllog/ui/CoalescedAnnotatedCallLogCursorLoader.java
diff options
context:
space:
mode:
authorzachh <zachh@google.com>2018-01-09 17:29:06 -0800
committerCopybara-Service <copybara-piper@google.com>2018-01-09 18:27:41 -0800
commitff88f7bbe07fb3e267af49427adf1a91e3fc21e9 (patch)
tree34211b16307c159d1726bddc0ec2e2468f66981d /java/com/android/dialer/calllog/ui/CoalescedAnnotatedCallLogCursorLoader.java
parent9f8d0676caa3a00849fa18def2996399ee1bc708 (diff)
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
Diffstat (limited to 'java/com/android/dialer/calllog/ui/CoalescedAnnotatedCallLogCursorLoader.java')
-rw-r--r--java/com/android/dialer/calllog/ui/CoalescedAnnotatedCallLogCursorLoader.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/java/com/android/dialer/calllog/ui/CoalescedAnnotatedCallLogCursorLoader.java b/java/com/android/dialer/calllog/ui/CoalescedAnnotatedCallLogCursorLoader.java
index 6d60bdda4..5c0ce2816 100644
--- a/java/com/android/dialer/calllog/ui/CoalescedAnnotatedCallLogCursorLoader.java
+++ b/java/com/android/dialer/calllog/ui/CoalescedAnnotatedCallLogCursorLoader.java
@@ -50,7 +50,8 @@ final class CoalescedAnnotatedCallLogCursorLoader extends CursorLoader {
private static final int IS_VOICEMAIL = 18;
private static final int CALL_TYPE = 19;
private static final int CAN_REPORT_AS_INVALID_NUMBER = 20;
- private static final int COALESCED_IDS = 21;
+ private static final int CP2_INFO_INCOMPLETE = 21;
+ private static final int COALESCED_IDS = 22;
CoalescedAnnotatedCallLogCursorLoader(Context context) {
// CoalescedAnnotatedCallLog requires that PROJECTION be ALL_COLUMNS and the following params be
@@ -102,6 +103,7 @@ final class CoalescedAnnotatedCallLogCursorLoader extends CursorLoader {
.setIsVoicemail(cursor.getInt(IS_VOICEMAIL) == 1)
.setCallType(cursor.getInt(CALL_TYPE))
.setCanReportAsInvalidNumber(cursor.getInt(CAN_REPORT_AS_INVALID_NUMBER) == 1)
+ .setCp2InfoIncomplete(cursor.getInt(CP2_INFO_INCOMPLETE) == 1)
.setCoalescedIds(coalescedIds)
.build();
}