diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2018-03-19 23:49:51 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2018-03-19 23:49:51 +0000 |
commit | a68f3429431c20b0740f0467935d944763ad06cd (patch) | |
tree | 7bd55b5175802fe3ac8fe4c45bf27cdd583ee580 /java/com/android/dialer/calllog/ui | |
parent | 6dda44d014c1d5edb11d707bdd270107c6553ffb (diff) | |
parent | cd3d49843431913c2ff042d2294a8b5201877882 (diff) |
Merge "Implement VoicemailDataSource"
Diffstat (limited to 'java/com/android/dialer/calllog/ui')
3 files changed, 10 insertions, 4 deletions
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(); } diff --git a/java/com/android/dialer/calllog/ui/NewCallLogViewHolder.java b/java/com/android/dialer/calllog/ui/NewCallLogViewHolder.java index 4c2d124d7..74be21b0c 100644 --- a/java/com/android/dialer/calllog/ui/NewCallLogViewHolder.java +++ b/java/com/android/dialer/calllog/ui/NewCallLogViewHolder.java @@ -153,7 +153,8 @@ final class NewCallLogViewHolder extends RecyclerView.ViewHolder { private void setPhoto(CoalescedRow row) { PhotoInfo.Builder photoInfoBuilder = - NumberAttributesConverter.toPhotoInfoBuilder(row.numberAttributes()); + NumberAttributesConverter.toPhotoInfoBuilder(row.numberAttributes()) + .setIsVoicemail(row.isVoicemailCall()); if (!TextUtils.isEmpty(row.formattedNumber())) { photoInfoBuilder.setFormattedNumber(row.formattedNumber()); } diff --git a/java/com/android/dialer/calllog/ui/menu/Modules.java b/java/com/android/dialer/calllog/ui/menu/Modules.java index fd5f6a348..69b42e304 100644 --- a/java/com/android/dialer/calllog/ui/menu/Modules.java +++ b/java/com/android/dialer/calllog/ui/menu/Modules.java @@ -176,7 +176,8 @@ final class Modules { private static PhotoInfo createPhotoInfoFromRow(CoalescedRow row) { PhotoInfo.Builder photoInfoBuilder = NumberAttributesConverter.toPhotoInfoBuilder(row.numberAttributes()) - .setIsVideo((row.features() & Calls.FEATURES_VIDEO) == Calls.FEATURES_VIDEO); + .setIsVideo((row.features() & Calls.FEATURES_VIDEO) == Calls.FEATURES_VIDEO) + .setIsVoicemail(row.isVoicemailCall()); if (!TextUtils.isEmpty(row.formattedNumber())) { photoInfoBuilder.setFormattedNumber(row.formattedNumber()); } |