From 5680b01ecb566e60a63c3a3362ec31f912cef692 Mon Sep 17 00:00:00 2001 From: linyuh Date: Mon, 22 Jan 2018 11:33:01 -0800 Subject: Properly display date and/or time of entries in the new call log. Bug: 70989595 Test: CallLogDatesTest, CallLogEntryTextTest PiperOrigin-RevId: 182809700 Change-Id: I84b699536ae7f77e6c27db0b1b008e3ebc6216c2 --- .../dialer/calllogutils/CallLogEntryText.java | 31 ++++++++++++---------- 1 file changed, 17 insertions(+), 14 deletions(-) (limited to 'java/com/android/dialer/calllogutils/CallLogEntryText.java') diff --git a/java/com/android/dialer/calllogutils/CallLogEntryText.java b/java/com/android/dialer/calllogutils/CallLogEntryText.java index 1df44583f..25fe86452 100644 --- a/java/com/android/dialer/calllogutils/CallLogEntryText.java +++ b/java/com/android/dialer/calllogutils/CallLogEntryText.java @@ -49,22 +49,25 @@ public final class CallLogEntryText { return primaryText.toString(); } - /** The secondary text to show in the main call log entry list. */ + /** + * The secondary text to show in the main call log entry list. + * + *

Rules: (Duo video, )?$Label|$Location • Date + * + *

Examples: + * + *

+ * + *

See {@link CallLogDates#newCallLogTimestampLabel(Context, long, long)} for date rules. + */ public static CharSequence buildSecondaryTextForEntries( Context context, Clock clock, CoalescedRow row) { - /* - * Rules: (Duo video, )?$Label|$Location • Date - * - * Examples: - * Duo Video, Mobile • Now - * Duo Video • 11:45pm - * Mobile • 11:45pm - * Mobile • Sunday - * Brooklyn, NJ • Jan 15 - * - * Date rules: - * if < 1 minute ago: "Now"; else if today: HH:MM(am|pm); else if < 3 days: day; else: MON D - */ StringBuilder secondaryText = secondaryTextPrefix(context, row); if (secondaryText.length() > 0) { -- cgit v1.2.3