diff options
Diffstat (limited to 'java/com/android/dialer/calllog/ui/menu')
-rw-r--r-- | java/com/android/dialer/calllog/ui/menu/BottomSheetHeader.java (renamed from java/com/android/dialer/calllog/ui/menu/PrimaryAction.java) | 19 | ||||
-rw-r--r-- | java/com/android/dialer/calllog/ui/menu/NewCallLogMenu.java | 2 |
2 files changed, 9 insertions, 12 deletions
diff --git a/java/com/android/dialer/calllog/ui/menu/PrimaryAction.java b/java/com/android/dialer/calllog/ui/menu/BottomSheetHeader.java index 279869d70..d348541d7 100644 --- a/java/com/android/dialer/calllog/ui/menu/PrimaryAction.java +++ b/java/com/android/dialer/calllog/ui/menu/BottomSheetHeader.java @@ -20,26 +20,23 @@ import android.content.Context; import android.provider.CallLog.Calls; import com.android.dialer.calllog.model.CoalescedRow; import com.android.dialer.calllogutils.CallLogEntryText; -import com.android.dialer.calllogutils.CallLogIntents; import com.android.dialer.calllogutils.NumberAttributesConverter; -import com.android.dialer.historyitemactions.HistoryItemPrimaryActionInfo; +import com.android.dialer.historyitemactions.HistoryItemBottomSheetHeaderInfo; -/** Configures the primary action row (top row) for the bottom sheet. */ -final class PrimaryAction { +/** Configures the top row in the bottom sheet. */ +final class BottomSheetHeader { - static HistoryItemPrimaryActionInfo fromRow(Context context, CoalescedRow row) { - CharSequence primaryText = CallLogEntryText.buildPrimaryText(context, row); - - return HistoryItemPrimaryActionInfo.builder() + static HistoryItemBottomSheetHeaderInfo fromRow(Context context, CoalescedRow row) { + return HistoryItemBottomSheetHeaderInfo.newBuilder() .setNumber(row.getNumber()) .setPhotoInfo( NumberAttributesConverter.toPhotoInfoBuilder(row.getNumberAttributes()) .setFormattedNumber(row.getFormattedNumber()) .setIsVideo((row.getFeatures() & Calls.FEATURES_VIDEO) == Calls.FEATURES_VIDEO) .build()) - .setPrimaryText(primaryText) - .setSecondaryText(CallLogEntryText.buildSecondaryTextForBottomSheet(context, row)) - .setIntent(CallLogIntents.getCallBackIntent(context, row)) + .setPrimaryText(CallLogEntryText.buildPrimaryText(context, row).toString()) + .setSecondaryText( + CallLogEntryText.buildSecondaryTextForBottomSheet(context, row).toString()) .build(); } } diff --git a/java/com/android/dialer/calllog/ui/menu/NewCallLogMenu.java b/java/com/android/dialer/calllog/ui/menu/NewCallLogMenu.java index 5be19ce0c..78354caac 100644 --- a/java/com/android/dialer/calllog/ui/menu/NewCallLogMenu.java +++ b/java/com/android/dialer/calllog/ui/menu/NewCallLogMenu.java @@ -36,7 +36,7 @@ public final class NewCallLogMenu { return view -> { HistoryItemActionBottomSheet.show( context, - PrimaryAction.fromRow(context, row), + BottomSheetHeader.fromRow(context, row), Modules.fromRow(context, row), glidePhotoManager); |