diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2018-04-12 23:23:09 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2018-04-12 23:23:09 +0000 |
commit | f599b4bbf9c9c0224f64934d78f00ba6690c6c7f (patch) | |
tree | 0f1f4cc08e164cde9f891f83749edff34eb94a89 /java/com/android/dialer/calldetails/CallDetailsEntryViewHolder.java | |
parent | 9ef6d8c84b7b33e069258d41db9eef16e3d2b9fa (diff) | |
parent | d6b10d559f345eab2dd3dd89b07cfc3fd79c59bc (diff) |
Merge "Add RTT transcript to call details."
Diffstat (limited to 'java/com/android/dialer/calldetails/CallDetailsEntryViewHolder.java')
-rw-r--r-- | java/com/android/dialer/calldetails/CallDetailsEntryViewHolder.java | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/java/com/android/dialer/calldetails/CallDetailsEntryViewHolder.java b/java/com/android/dialer/calldetails/CallDetailsEntryViewHolder.java index edf25df99..5c4a196fa 100644 --- a/java/com/android/dialer/calldetails/CallDetailsEntryViewHolder.java +++ b/java/com/android/dialer/calldetails/CallDetailsEntryViewHolder.java @@ -55,6 +55,7 @@ public class CallDetailsEntryViewHolder extends ViewHolder { private final TextView multimediaDetails; private final TextView postCallNote; + private final TextView rttTranscript; private final ImageView multimediaImage; @@ -81,6 +82,7 @@ public class CallDetailsEntryViewHolder extends ViewHolder { multimediaImage = (ImageView) container.findViewById(R.id.multimedia_image); multimediaAttachmentsNumber = (TextView) container.findViewById(R.id.multimedia_attachments_number); + rttTranscript = container.findViewById(R.id.rtt_transcript); } void setCallDetails( @@ -94,6 +96,9 @@ public class CallDetailsEntryViewHolder extends ViewHolder { (entry.getFeatures() & Calls.FEATURES_PULLED_EXTERNALLY) == Calls.FEATURES_PULLED_EXTERNALLY; boolean isDuoCall = entry.getIsDuoCall(); + boolean isRttCall = + BuildCompat.isAtLeastP() + && (entry.getFeatures() & Calls.FEATURES_RTT) == Calls.FEATURES_RTT; callTime.setTextColor(getColorForCallType(context, callType)); callTypeIcon.clear(); @@ -123,6 +128,18 @@ public class CallDetailsEntryViewHolder extends ViewHolder { context, entry.getDuration(), entry.getDataUsage())); } setMultimediaDetails(number, entry, showMultimediaDivider); + if (isRttCall) { + if (entry.getHasRttTranscript()) { + rttTranscript.setText(R.string.rtt_transcript_link); + rttTranscript.setTextAppearance(R.style.RttTranscriptLink); + rttTranscript.setClickable(true); + } else { + rttTranscript.setText(R.string.rtt_transcript_not_available); + rttTranscript.setTextAppearance(R.style.RttTranscriptMessage); + rttTranscript.setClickable(false); + } + rttTranscript.setVisibility(View.VISIBLE); + } } private void setMultimediaDetails(String number, CallDetailsEntry entry, boolean showDivider) { |