From cd3d49843431913c2ff042d2294a8b5201877882 Mon Sep 17 00:00:00 2001 From: twyen Date: Mon, 19 Mar 2018 15:20:59 -0700 Subject: Implement VoicemailDataSource This data source determines if the call is to the voicemail inbox. isVoicemail() is removed from NumberAttributes and PhoneLookup. It is yet decided how in call UI should handle voicemail calls in the future. TAG_CHANGE_OK=proto not in prod yet. Please clear app data. TYPE_CHANGE_OK=above Bug: 70989587 Test: Unit tests PiperOrigin-RevId: 189650273 Change-Id: Iafebf1abb18c74301b62a72d1d04deecd6d78d29 --- .../dialer/calllog/ui/CoalescedAnnotatedCallLogCursorLoader.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'java/com/android/dialer/calllog/ui/CoalescedAnnotatedCallLogCursorLoader.java') diff --git a/java/com/android/dialer/calllog/ui/CoalescedAnnotatedCallLogCursorLoader.java b/java/com/android/dialer/calllog/ui/CoalescedAnnotatedCallLogCursorLoader.java index 0b1c6c990..a5cfd3f59 100644 --- a/java/com/android/dialer/calllog/ui/CoalescedAnnotatedCallLogCursorLoader.java +++ b/java/com/android/dialer/calllog/ui/CoalescedAnnotatedCallLogCursorLoader.java @@ -44,8 +44,10 @@ final class CoalescedAnnotatedCallLogCursorLoader extends CursorLoader { private static final int PHONE_ACCOUNT_COLOR = 11; private static final int FEATURES = 12; private static final int NUMBER_ATTRIBUTES = 13; - private static final int CALL_TYPE = 14; - private static final int COALESCED_IDS = 15; + private static final int IS_VOICEMAIL_CALL = 14; + private static final int VOICEMAIL_CALL_TAG = 15; + private static final int CALL_TYPE = 16; + private static final int COALESCED_IDS = 17; CoalescedAnnotatedCallLogCursorLoader(Context context) { // CoalescedAnnotatedCallLog requires that PROJECTION be ALL_COLUMNS and the following params be @@ -98,6 +100,8 @@ final class CoalescedAnnotatedCallLogCursorLoader extends CursorLoader { .setFeatures(cursor.getInt(FEATURES)) .setCallType(cursor.getInt(CALL_TYPE)) .setNumberAttributes(numberAttributes) + .setIsVoicemailCall(cursor.getInt(IS_VOICEMAIL_CALL) == 1) + .setVoicemailCallTag(cursor.getString(VOICEMAIL_CALL_TAG)) .setCoalescedIds(coalescedIds) .build(); } -- cgit v1.2.3