diff options
Diffstat (limited to 'java/com/android/dialer/calllog/ui/menu/PrimaryAction.java')
-rw-r--r-- | java/com/android/dialer/calllog/ui/menu/PrimaryAction.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/java/com/android/dialer/calllog/ui/menu/PrimaryAction.java b/java/com/android/dialer/calllog/ui/menu/PrimaryAction.java index 404c41787..faedc8f62 100644 --- a/java/com/android/dialer/calllog/ui/menu/PrimaryAction.java +++ b/java/com/android/dialer/calllog/ui/menu/PrimaryAction.java @@ -19,16 +19,17 @@ package com.android.dialer.calllog.ui.menu; import android.content.Context; import android.provider.CallLog.Calls; import com.android.dialer.calllog.model.CoalescedRow; +import com.android.dialer.calllogutils.CallLogContactTypes; import com.android.dialer.calllogutils.CallLogEntryText; import com.android.dialer.calllogutils.CallLogIntents; import com.android.dialer.contactactions.ContactPrimaryActionInfo; import com.android.dialer.contactactions.ContactPrimaryActionInfo.PhotoInfo; -import com.android.dialer.lettertile.LetterTileDrawable; /** Configures the primary action row (top row) for the bottom sheet. */ final class PrimaryAction { static ContactPrimaryActionInfo fromRow(Context context, CoalescedRow row) { + CharSequence primaryText = CallLogEntryText.buildPrimaryText(context, row); return ContactPrimaryActionInfo.builder() .setNumber(row.number()) .setPhotoInfo( @@ -37,10 +38,10 @@ final class PrimaryAction { .setPhotoUri(row.photoUri()) .setLookupUri(row.lookupUri()) .setIsVideo((row.features() & Calls.FEATURES_VIDEO) == Calls.FEATURES_VIDEO) - .setContactType(LetterTileDrawable.TYPE_DEFAULT) // TODO(zachh): Use proper type. - .setDisplayName(row.name()) + .setContactType(CallLogContactTypes.getContactType(row)) + .setDisplayName(primaryText.toString()) .build()) - .setPrimaryText(CallLogEntryText.buildPrimaryText(context, row)) + .setPrimaryText(primaryText) .setSecondaryText(CallLogEntryText.buildSecondaryTextForBottomSheet(context, row)) .setIntent(CallLogIntents.getCallBackIntent(context, row)) .build(); |