diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2018-01-12 02:48:25 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2018-01-12 02:48:25 +0000 |
commit | 6bd659e6e90346f58ed08f6c127835a320bbd2e4 (patch) | |
tree | b90e5f582dcab0d3ad6393f4ffbc7a4dd78e81dc /java/com/android/dialer/voicemail/listui/NewVoicemailViewHolder.java | |
parent | 58bade2ace277dff4db3bbbfa2e07015f0f7c6ad (diff) | |
parent | 01aac5de58903555a089d16a58b9346d34d54e7b (diff) |
Merge changes I2e091371,I4e0bc1c6,I24063ee4
* changes:
Implement PhoneLookup for CP2 remote contacts
Merge PhoneLookupDataSource results into a proto in annotated call log.
Attempt to place call even call permission is missing
Diffstat (limited to 'java/com/android/dialer/voicemail/listui/NewVoicemailViewHolder.java')
-rw-r--r-- | java/com/android/dialer/voicemail/listui/NewVoicemailViewHolder.java | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/java/com/android/dialer/voicemail/listui/NewVoicemailViewHolder.java b/java/com/android/dialer/voicemail/listui/NewVoicemailViewHolder.java index 90581580d..46e29956d 100644 --- a/java/com/android/dialer/voicemail/listui/NewVoicemailViewHolder.java +++ b/java/com/android/dialer/voicemail/listui/NewVoicemailViewHolder.java @@ -27,6 +27,7 @@ import android.graphics.Typeface; import android.net.Uri; import android.provider.VoicemailContract.Voicemails; import android.support.annotation.NonNull; +import android.support.annotation.Nullable; import android.support.annotation.WorkerThread; import android.support.v7.widget.RecyclerView; import android.text.TextUtils; @@ -205,13 +206,18 @@ final class NewVoicemailViewHolder extends RecyclerView.ViewHolder implements On ContactPhotoManager.getInstance(context) .loadDialerThumbnailOrPhoto( quickContactBadge, - voicemailEntry.lookupUri() == null ? null : Uri.parse(voicemailEntry.lookupUri()), - voicemailEntry.photoId(), - voicemailEntry.photoUri() == null ? null : Uri.parse(voicemailEntry.photoUri()), - voicemailEntry.name(), + parseUri(voicemailEntry.numberAttributes().getLookupUri()), + voicemailEntry.numberAttributes().getPhotoId(), + parseUri(voicemailEntry.numberAttributes().getPhotoUri()), + VoicemailEntryText.buildPrimaryVoicemailText(context, voicemailEntry), LetterTileDrawable.TYPE_DEFAULT); } + @Nullable + private static Uri parseUri(@Nullable String string) { + return TextUtils.isEmpty(string) ? null : Uri.parse(string); + } + void collapseViewHolder() { LogUtil.i( "NewVoicemailViewHolder.collapseViewHolder", |