summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/com/android/dialer/PhoneCallDetailsHelper.java8
-rw-r--r--src/com/android/dialer/calllog/PhoneNumberDisplayUtil.java8
2 files changed, 9 insertions, 7 deletions
diff --git a/src/com/android/dialer/PhoneCallDetailsHelper.java b/src/com/android/dialer/PhoneCallDetailsHelper.java
index db37bb3f3..c8206227a 100644
--- a/src/com/android/dialer/PhoneCallDetailsHelper.java
+++ b/src/com/android/dialer/PhoneCallDetailsHelper.java
@@ -212,10 +212,12 @@ public class PhoneCallDetailsHelper {
@NeededForTesting
public void setCallDetailsHeader(TextView nameView, PhoneCallDetails details) {
final CharSequence nameText;
- if (TextUtils.isEmpty(details.name)) {
- nameText = mResources.getString(R.string.recentCalls_addToContact);
- } else {
+ if (!TextUtils.isEmpty(details.name)) {
nameText = details.name;
+ } else if (!TextUtils.isEmpty(details.displayNumber)) {
+ nameText = details.displayNumber;
+ } else {
+ nameText = mResources.getString(R.string.unknown);
}
nameView.setText(nameText);
diff --git a/src/com/android/dialer/calllog/PhoneNumberDisplayUtil.java b/src/com/android/dialer/calllog/PhoneNumberDisplayUtil.java
index e7fcde263..acfd32cf3 100644
--- a/src/com/android/dialer/calllog/PhoneNumberDisplayUtil.java
+++ b/src/com/android/dialer/calllog/PhoneNumberDisplayUtil.java
@@ -71,14 +71,14 @@ public class PhoneNumberDisplayUtil {
int presentation,
CharSequence formattedNumber,
boolean isVoicemail) {
- if (!TextUtils.isEmpty(formattedNumber)) {
- return formattedNumber;
- }
-
final CharSequence displayName =
getDisplayName(context, accountHandle, number, presentation, isVoicemail);
if (!TextUtils.isEmpty(displayName)) {
return displayName;
+ }
+
+ if (!TextUtils.isEmpty(formattedNumber)) {
+ return formattedNumber;
} else if (!TextUtils.isEmpty(number)) {
return number;
} else {