From 4e9a7930756e2e1dbfba20355f8f716987835a3a Mon Sep 17 00:00:00 2001 From: zachh Date: Tue, 15 Aug 2017 18:13:03 -0700 Subject: Added a few more columns to annotated call log. These are mostly columns that are just copied from the system call log. Also refactored and implemented new logic for displaying call log durations and dates (not used yet). Bug: 34672501 Test: existing and new PiperOrigin-RevId: 165387731 Change-Id: I2bc736d848b5c10e42562e62beea64efdeed9c12 --- .../android/dialer/calldetails/CallDetailsEntryViewHolder.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'java/com/android/dialer/calldetails/CallDetailsEntryViewHolder.java') diff --git a/java/com/android/dialer/calldetails/CallDetailsEntryViewHolder.java b/java/com/android/dialer/calldetails/CallDetailsEntryViewHolder.java index 9c592fc5f..084bd667c 100644 --- a/java/com/android/dialer/calldetails/CallDetailsEntryViewHolder.java +++ b/java/com/android/dialer/calldetails/CallDetailsEntryViewHolder.java @@ -28,7 +28,8 @@ import android.view.View; import android.widget.ImageView; import android.widget.TextView; import com.android.dialer.calldetails.CallDetailsEntries.CallDetailsEntry; -import com.android.dialer.calllogutils.CallEntryFormatter; +import com.android.dialer.calllogutils.CallLogDates; +import com.android.dialer.calllogutils.CallLogDurations; import com.android.dialer.calllogutils.CallTypeHelper; import com.android.dialer.calllogutils.CallTypeIconsView; import com.android.dialer.common.LogUtil; @@ -103,16 +104,17 @@ public class CallDetailsEntryViewHolder extends ViewHolder { callTypeText.setText( callTypeHelper.getCallTypeText(callType, isVideoCall, isPulledCall, isLightbringerCall)); - callTime.setText(CallEntryFormatter.formatDate(context, entry.getDate())); + callTime.setText(CallLogDates.formatDate(context, entry.getDate())); + if (CallTypeHelper.isMissedCallType(callType)) { callDuration.setVisibility(View.GONE); } else { callDuration.setVisibility(View.VISIBLE); callDuration.setText( - CallEntryFormatter.formatDurationAndDataUsage( + CallLogDurations.formatDurationAndDataUsage( context, entry.getDuration(), entry.getDataUsage())); callDuration.setContentDescription( - CallEntryFormatter.formatDurationAndDataUsageA11y( + CallLogDurations.formatDurationAndDataUsageA11y( context, entry.getDuration(), entry.getDataUsage())); } setMultimediaDetails(number, entry, showMultimediaDivider); -- cgit v1.2.3