Use "Add to contacts" as header for unknown numbers.
Instead of repeating the number twice (in the header and in the
underlying call button), use the string "Add to contacts" instead, which
better represents the action performed by the header when clicked.
Bug: 5205326
Change-Id: I568373db2bbbd0ab7d5645a70eb25fbd577dca1e
diff --git a/src/com/android/contacts/PhoneCallDetailsHelper.java b/src/com/android/contacts/PhoneCallDetailsHelper.java
index e79bdce..2d75c26 100644
--- a/src/com/android/contacts/PhoneCallDetailsHelper.java
+++ b/src/com/android/contacts/PhoneCallDetailsHelper.java
@@ -129,11 +129,12 @@
views.numberView.setText(numberText);
}
- /** Sets the name in the text view for the given phone call. */
- public void setPhoneCallName(TextView nameView, PhoneCallDetails details) {
+ /** Sets the text of the header view for the details page of a phone call. */
+ public void setCallDetailsHeader(TextView nameView, PhoneCallDetails details) {
final CharSequence nameText;
final CharSequence displayNumber =
- mPhoneNumberHelper.getDisplayNumber(details.number, details.formattedNumber);
+ mPhoneNumberHelper.getDisplayNumber(details.number,
+ mResources.getString(R.string.recentCalls_addToContact));
if (TextUtils.isEmpty(details.name)) {
nameText = displayNumber;
} else {