diff options
author | Eric Erfanian <erfanian@google.com> | 2017-05-05 15:23:13 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2017-05-05 15:23:13 +0000 |
commit | 300a8683b9c28424fb0f0c571a0abe128c461f69 (patch) | |
tree | 3a325b0effac02fbd228b8ddf2f96589e5df72cd /java/com/android/dialer/calldetails/CallDetailsEntryViewHolder.java | |
parent | d67f1627521b174f12e0c247f154c7c93c5e408e (diff) | |
parent | 10b34a5ebf12e97ecba0caf3c8e30b476b038a96 (diff) |
Update Dialer to V10 RC16
am: 10b34a5ebf
Change-Id: Iea3e96ccdeaf1fa796ceca702cace82ca20f298c
Diffstat (limited to 'java/com/android/dialer/calldetails/CallDetailsEntryViewHolder.java')
-rw-r--r-- | java/com/android/dialer/calldetails/CallDetailsEntryViewHolder.java | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/java/com/android/dialer/calldetails/CallDetailsEntryViewHolder.java b/java/com/android/dialer/calldetails/CallDetailsEntryViewHolder.java index 156fa4255..bc989ea25 100644 --- a/java/com/android/dialer/calldetails/CallDetailsEntryViewHolder.java +++ b/java/com/android/dialer/calldetails/CallDetailsEntryViewHolder.java @@ -111,10 +111,10 @@ public class CallDetailsEntryViewHolder extends ViewHolder { callDuration.setVisibility(View.VISIBLE); callDuration.setText( CallEntryFormatter.formatDurationAndDataUsage( - context, entry.getDuration(), entry.getDataUsage(), false /* a11y */)); + context, entry.getDuration(), entry.getDataUsage())); callDuration.setContentDescription( - CallEntryFormatter.formatDurationAndDataUsage( - context, entry.getDuration(), entry.getDataUsage(), true /* a11y */)); + CallEntryFormatter.formatDurationAndDataUsageA11y( + context, entry.getDuration(), entry.getDataUsage())); } setMultimediaDetails(number, entry, showMultimediaDivider); } @@ -128,10 +128,7 @@ public class CallDetailsEntryViewHolder extends ViewHolder { HistoryResult historyResult = entry.getHistoryResults(0); multimediaDetailsContainer.setVisibility(View.VISIBLE); - multimediaDetailsContainer.setOnClickListener( - (v) -> { - DialerUtils.startActivityWithErrorToast(context, IntentUtil.getSendSmsIntent(number)); - }); + multimediaDetailsContainer.setOnClickListener((v) -> startSmsIntent(context, number)); multimediaImageContainer.setClipToOutline(true); if (!TextUtils.isEmpty(historyResult.getImageUri())) { @@ -159,12 +156,17 @@ public class CallDetailsEntryViewHolder extends ViewHolder { postCallNote.setVisibility(View.VISIBLE); postCallNote.setText( context.getString(R.string.message_in_quotes, entry.getHistoryResults(1).getText())); + postCallNote.setOnClickListener((v) -> startSmsIntent(context, number)); } else { LogUtil.i("CallDetailsEntryViewHolder.setMultimediaDetails", "no post call note"); } } } + private void startSmsIntent(Context context, String number) { + DialerUtils.startActivityWithErrorToast(context, IntentUtil.getSendSmsIntent(number)); + } + private static boolean isIncoming(@NonNull HistoryResult historyResult) { return historyResult.getType() == Type.INCOMING_POST_CALL || historyResult.getType() == Type.INCOMING_CALL_COMPOSER; |