summaryrefslogtreecommitdiff
path: root/java/com/android/dialer/calldetails/CallDetailsEntryViewHolder.java
diff options
context:
space:
mode:
authorEric Erfanian <erfanian@google.com>2017-08-31 06:57:16 -0700
committerEric Erfanian <erfanian@google.com>2017-08-31 16:13:53 +0000
commit2ca4318cc1ee57dda907ba2069bd61d162b1baef (patch)
treee282668a9587cf6c1ec7b604dea860400c75c6c7 /java/com/android/dialer/calldetails/CallDetailsEntryViewHolder.java
parent68038172793ee0e2ab3e2e56ddfbeb82879d1f58 (diff)
Update Dialer source to latest internal Google revision.
Previously, Android's Dialer app was developed in an internal Google source control system and only exported to public during AOSP drops. The Dialer team is now switching to a public development model similar to the telephony team. This CL represents all internal Google changes that were committed to Dialer between the public O release and today's tip of tree on internal master. This CL squashes those changes into a single commit. In subsequent changes, changes will be exported on a per-commit basis. Test: make, flash install, run Merged-In: I45270eaa8ce732d71a1bd84b08c7fa0e99af3160 Change-Id: I529aaeb88535b9533c0ae4ef4e6c1222d4e0f1c8 PiperOrigin-RevId: 167068436
Diffstat (limited to 'java/com/android/dialer/calldetails/CallDetailsEntryViewHolder.java')
-rw-r--r--java/com/android/dialer/calldetails/CallDetailsEntryViewHolder.java23
1 files changed, 12 insertions, 11 deletions
diff --git a/java/com/android/dialer/calldetails/CallDetailsEntryViewHolder.java b/java/com/android/dialer/calldetails/CallDetailsEntryViewHolder.java
index bc989ea25..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;
@@ -36,7 +37,6 @@ import com.android.dialer.compat.AppCompatConstants;
import com.android.dialer.enrichedcall.historyquery.proto.HistoryResult;
import com.android.dialer.enrichedcall.historyquery.proto.HistoryResult.Type;
import com.android.dialer.oem.MotorolaUtils;
-import com.android.dialer.util.CallUtil;
import com.android.dialer.util.DialerUtils;
import com.android.dialer.util.IntentUtil;
@@ -57,7 +57,7 @@ public class CallDetailsEntryViewHolder extends ViewHolder {
private final ImageView multimediaImage;
- // TODO: Display this when location is stored - b/36160042
+ // TODO(maxwelb): Display this when location is stored - b/36160042
@SuppressWarnings("unused")
private final TextView multimediaAttachmentsNumber;
@@ -88,32 +88,33 @@ public class CallDetailsEntryViewHolder extends ViewHolder {
CallTypeHelper callTypeHelper,
boolean showMultimediaDivider) {
int callType = entry.getCallType();
- boolean isVideoCall =
- (entry.getFeatures() & Calls.FEATURES_VIDEO) == Calls.FEATURES_VIDEO
- && CallUtil.isVideoEnabled(context);
+ boolean isVideoCall = (entry.getFeatures() & Calls.FEATURES_VIDEO) == Calls.FEATURES_VIDEO;
boolean isPulledCall =
(entry.getFeatures() & Calls.FEATURES_PULLED_EXTERNALLY)
== Calls.FEATURES_PULLED_EXTERNALLY;
+ boolean isLightbringerCall = entry.getIsLightbringerCall();
callTime.setTextColor(getColorForCallType(context, callType));
callTypeIcon.clear();
callTypeIcon.add(callType);
- callTypeIcon.setShowVideo((entry.getFeatures() & Calls.FEATURES_VIDEO) == Calls.FEATURES_VIDEO);
+ callTypeIcon.setShowVideo(isVideoCall);
callTypeIcon.setShowHd(MotorolaUtils.shouldShowHdIconInCallLog(context, entry.getFeatures()));
callTypeIcon.setShowWifi(
MotorolaUtils.shouldShowWifiIconInCallLog(context, entry.getFeatures()));
- callTypeText.setText(callTypeHelper.getCallTypeText(callType, isVideoCall, isPulledCall));
- callTime.setText(CallEntryFormatter.formatDate(context, entry.getDate()));
+ callTypeText.setText(
+ callTypeHelper.getCallTypeText(callType, isVideoCall, isPulledCall, isLightbringerCall));
+ 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);