Loading res/values/strings.xml +0 −7 Original line number Diff line number Diff line Loading @@ -1676,13 +1676,6 @@ <!-- Used to display as default status when the contact is busy or Do not disturb for chat [CHAR LIMIT=19] --> <string name="status_busy">Busy</string> <!-- String describing the icon in the call log used to place a call. Note: AccessibilityServices use this attribute to announce what the view represents. This is especially valuable for views without textual representation like ImageView. --> <string name="description_call_log_call_button">Call number</string> <!-- String describing the icon in the call log used to play a voicemail. Note: AccessibilityServices use this attribute to announce what the view represents. Loading src/com/android/contacts/calllog/CallLogListItemHelper.java +17 −4 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ import com.android.contacts.R; import android.content.res.Resources; import android.provider.CallLog.Calls; import android.text.TextUtils; import android.view.View; /** Loading Loading @@ -68,7 +69,7 @@ import android.view.View; views.dividerView.setVisibility(View.VISIBLE); } else if (canCall) { // Call is the secondary action. configureCallSecondaryAction(views); configureCallSecondaryAction(views, details); views.dividerView.setVisibility(View.VISIBLE); } else { // No action available. Loading @@ -78,11 +79,23 @@ import android.view.View; } /** Sets the secondary action to correspond to the call button. */ private void configureCallSecondaryAction(CallLogListItemViews views) { private void configureCallSecondaryAction(CallLogListItemViews views, PhoneCallDetails details) { views.secondaryActionView.setVisibility(View.VISIBLE); views.secondaryActionView.setImageResource(R.drawable.ic_ab_dialer_holo_dark); views.secondaryActionView.setContentDescription( mResources.getString(R.string.description_call_log_call_button)); views.secondaryActionView.setContentDescription(getCallActionDescription(details)); } /** Returns the description used by the call action for this phone call. */ private CharSequence getCallActionDescription(PhoneCallDetails details) { final CharSequence recipient; if (!TextUtils.isEmpty(details.name)) { recipient = details.name; } else { recipient = mPhoneNumberHelper.getDisplayNumber( details.number, details.formattedNumber); } return mResources.getString(R.string.description_call, recipient); } /** Sets the secondary action to correspond to the play button. */ Loading Loading
res/values/strings.xml +0 −7 Original line number Diff line number Diff line Loading @@ -1676,13 +1676,6 @@ <!-- Used to display as default status when the contact is busy or Do not disturb for chat [CHAR LIMIT=19] --> <string name="status_busy">Busy</string> <!-- String describing the icon in the call log used to place a call. Note: AccessibilityServices use this attribute to announce what the view represents. This is especially valuable for views without textual representation like ImageView. --> <string name="description_call_log_call_button">Call number</string> <!-- String describing the icon in the call log used to play a voicemail. Note: AccessibilityServices use this attribute to announce what the view represents. Loading
src/com/android/contacts/calllog/CallLogListItemHelper.java +17 −4 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ import com.android.contacts.R; import android.content.res.Resources; import android.provider.CallLog.Calls; import android.text.TextUtils; import android.view.View; /** Loading Loading @@ -68,7 +69,7 @@ import android.view.View; views.dividerView.setVisibility(View.VISIBLE); } else if (canCall) { // Call is the secondary action. configureCallSecondaryAction(views); configureCallSecondaryAction(views, details); views.dividerView.setVisibility(View.VISIBLE); } else { // No action available. Loading @@ -78,11 +79,23 @@ import android.view.View; } /** Sets the secondary action to correspond to the call button. */ private void configureCallSecondaryAction(CallLogListItemViews views) { private void configureCallSecondaryAction(CallLogListItemViews views, PhoneCallDetails details) { views.secondaryActionView.setVisibility(View.VISIBLE); views.secondaryActionView.setImageResource(R.drawable.ic_ab_dialer_holo_dark); views.secondaryActionView.setContentDescription( mResources.getString(R.string.description_call_log_call_button)); views.secondaryActionView.setContentDescription(getCallActionDescription(details)); } /** Returns the description used by the call action for this phone call. */ private CharSequence getCallActionDescription(PhoneCallDetails details) { final CharSequence recipient; if (!TextUtils.isEmpty(details.name)) { recipient = details.name; } else { recipient = mPhoneNumberHelper.getDisplayNumber( details.number, details.formattedNumber); } return mResources.getString(R.string.description_call, recipient); } /** Sets the secondary action to correspond to the play button. */ Loading