From 5619f2ed87cb207352c0ff5578348baeb69ee202 Mon Sep 17 00:00:00 2001 From: Tyler Gunn Date: Tue, 15 Jul 2014 12:40:28 -0700 Subject: Various call log / call details video call changes. Requires cl/501841. Call log: 1. Add video call affordance. 2. Add accessibility text for calls, video call afforance. 3. Fixed unit test Call details: 1. Showing video icon when a call had video. 2. Changing call headings to indicate they were video calls. Bug: 16013879 Bug: 16013344 Bug: 16013684 Change-Id: I53b5bf9b0b1a63f9d119318d59f690d310cca7c8 --- src/com/android/dialer/calllog/CallLogAdapter.java | 23 +++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'src/com/android/dialer/calllog/CallLogAdapter.java') diff --git a/src/com/android/dialer/calllog/CallLogAdapter.java b/src/com/android/dialer/calllog/CallLogAdapter.java index f4b9f3a94..d70a40dea 100644 --- a/src/com/android/dialer/calllog/CallLogAdapter.java +++ b/src/com/android/dialer/calllog/CallLogAdapter.java @@ -895,6 +895,7 @@ public class CallLogAdapter extends GroupingListAdapter // focus was successful. The first successful focus will satisfy the OR // block and block further attempts to set focus. boolean focused = views.callBackButtonView.requestAccessibilityFocus() || + views.videoCallButtonView.requestAccessibilityFocus() || views.voicemailButtonView.requestAccessibilityFocus() || views.detailsButtonView.requestAccessibilityFocus(); } else { @@ -929,6 +930,11 @@ public class CallLogAdapter extends GroupingListAdapter R.id.call_back_action); } + if (views.videoCallButtonView == null) { + views.videoCallButtonView = (TextView)views.actionsView.findViewById( + R.id.video_call_action); + } + if (views.voicemailButtonView == null) { views.voicemailButtonView = (TextView)views.actionsView.findViewById( R.id.voicemail_action); @@ -960,8 +966,10 @@ public class CallLogAdapter extends GroupingListAdapter * @param views The call log item views. */ private void bindActionButtons(CallLogListItemViews views) { + boolean canPlaceCallToNumber = + PhoneNumberUtilsWrapper.canPlaceCallsTo(views.number, views.numberPresentation); // Set return call intent, otherwise null. - if (PhoneNumberUtilsWrapper.canPlaceCallsTo(views.number, views.numberPresentation)) { + if (canPlaceCallToNumber) { // Sets the primary action to call the number. views.callBackButtonView.setTag( IntentProvider.getReturnCallIntentProvider(views.number, views.mAccount)); @@ -973,6 +981,18 @@ public class CallLogAdapter extends GroupingListAdapter views.callBackButtonView.setVisibility(View.GONE); } + // If one of the calls had video capabilities, show the video call button. + if (canPlaceCallToNumber && views.phoneCallDetailsViews.callTypeIcons.isVideoShown()) { + views.videoCallButtonView.setTag( + IntentProvider.getReturnVideoCallIntentProvider(views.number, + views.mAccount)); + views.videoCallButtonView.setVisibility(View.VISIBLE); + views.videoCallButtonView.setOnClickListener(mActionListener); + } else { + views.videoCallButtonView.setTag(null); + views.videoCallButtonView.setVisibility(View.GONE); + } + // For voicemail calls, show the "VOICEMAIL" action button; hide otherwise. if (views.callType == Calls.VOICEMAIL_TYPE) { views.voicemailButtonView.setOnClickListener(mActionListener); @@ -991,6 +1011,7 @@ public class CallLogAdapter extends GroupingListAdapter IntentProvider.getCallDetailIntentProvider( views.rowId, views.callIds, null) ); + if (views.isExternal && !views.reported) { views.reportButtonView.setVisibility(View.VISIBLE); } -- cgit v1.2.3