diff options
Diffstat (limited to 'java/com/android/dialer/voicemail/listui/menu')
-rw-r--r-- | java/com/android/dialer/voicemail/listui/menu/NewVoicemailMenu.java | 6 | ||||
-rw-r--r-- | java/com/android/dialer/voicemail/listui/menu/PrimaryAction.java | 15 |
2 files changed, 7 insertions, 14 deletions
diff --git a/java/com/android/dialer/voicemail/listui/menu/NewVoicemailMenu.java b/java/com/android/dialer/voicemail/listui/menu/NewVoicemailMenu.java index 9af8de6f5..fbd7fe854 100644 --- a/java/com/android/dialer/voicemail/listui/menu/NewVoicemailMenu.java +++ b/java/com/android/dialer/voicemail/listui/menu/NewVoicemailMenu.java @@ -19,6 +19,7 @@ package com.android.dialer.voicemail.listui.menu; import android.content.Context; import android.view.View; import com.android.dialer.contactactions.ContactActionBottomSheet; +import com.android.dialer.glidephotomanager.GlidePhotoManager; import com.android.dialer.voicemail.model.VoicemailEntry; /** Handles configuration of the bottom sheet menus for voicemail entries. */ @@ -26,11 +27,12 @@ public final class NewVoicemailMenu { /** Creates and returns the OnClickListener which opens the menu for the provided row. */ public static View.OnClickListener createOnClickListener( - Context context, VoicemailEntry voicemailEntry) { + Context context, VoicemailEntry voicemailEntry, GlidePhotoManager glidePhotoManager) { return (view) -> ContactActionBottomSheet.show( context, PrimaryAction.fromVoicemailEntry(context, voicemailEntry), - Modules.fromVoicemailEntry(context, voicemailEntry)); + Modules.fromVoicemailEntry(context, voicemailEntry), + glidePhotoManager); } } diff --git a/java/com/android/dialer/voicemail/listui/menu/PrimaryAction.java b/java/com/android/dialer/voicemail/listui/menu/PrimaryAction.java index ffc53e779..91f505cb0 100644 --- a/java/com/android/dialer/voicemail/listui/menu/PrimaryAction.java +++ b/java/com/android/dialer/voicemail/listui/menu/PrimaryAction.java @@ -18,10 +18,8 @@ package com.android.dialer.voicemail.listui.menu; import android.content.Context; import android.text.TextUtils; +import com.android.dialer.calllogutils.NumberAttributesConverter; import com.android.dialer.contactactions.ContactPrimaryActionInfo; -import com.android.dialer.contactactions.ContactPrimaryActionInfo.PhotoInfo; -import com.android.dialer.contactphoto.NumberAttributeConverter; -import com.android.dialer.lettertile.LetterTileDrawable; import com.android.dialer.voicemail.model.VoicemailEntry; /** Configures the primary action row (top row) for theottom sheet for the Voicemail Tab */ @@ -38,15 +36,8 @@ final class PrimaryAction { return ContactPrimaryActionInfo.builder() .setNumber(voicemailEntry.number()) .setPhotoInfo( - PhotoInfo.builder() - .setPhotoId(voicemailEntry.numberAttributes().getPhotoId()) - .setPhotoUri( - NumberAttributeConverter.getPhotoUri( - context, voicemailEntry.numberAttributes())) - .setIsVideo(false) - .setContactType( - LetterTileDrawable.TYPE_DEFAULT) // TODO(uabdullah): Use proper type. - .setDisplayName(voicemailEntry.numberAttributes().getName()) + NumberAttributesConverter.toPhotoInfoBuilder(voicemailEntry.numberAttributes()) + .setFormattedNumber(voicemailEntry.formattedNumber()) .build()) .setPrimaryText(buildPrimaryVoicemailText(context, voicemailEntry)) .setSecondaryText(buildSecondaryVoicemailText(voicemailEntry)) |