Merge "Updates disable states for voicemail."
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 8ff6242..f4b94af 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -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.
diff --git a/src/com/android/contacts/calllog/CallLogListItemHelper.java b/src/com/android/contacts/calllog/CallLogListItemHelper.java
index 41dc0a3..6378c5e 100644
--- a/src/com/android/contacts/calllog/CallLogListItemHelper.java
+++ b/src/com/android/contacts/calllog/CallLogListItemHelper.java
@@ -22,6 +22,7 @@
 
 import android.content.res.Resources;
 import android.provider.CallLog.Calls;
+import android.text.TextUtils;
 import android.view.View;
 
 /**
@@ -68,7 +69,7 @@
             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.
@@ -78,11 +79,23 @@
     }
 
     /** 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. */