From 10575c0911d32edd24bad46bb7633202e2c7b619 Mon Sep 17 00:00:00 2001 From: Nancy Chen Date: Thu, 14 Jan 2016 14:48:18 -0800 Subject: Display "unknown" in the name field for voicemail with unknown callers. For calls, we will never display an empty name field because we have the "name presentation" from the call that will inform the UI how to display the name (whether "restricted", "unknown", etc.). However for voicemails, there is no such similar field because the voicemail is not associated with a particular call. In the case where the name field in the voicemail table is blank (which would be the case if the server failed to provide it or the caller obscured their phone number), instead of displaying an empty string, this CL defaults the name to "unknown". Bug: 25020236 Change-Id: I7355abb88ac4ac90f7b19c86f335964aaad336aa --- src/com/android/dialer/calllog/PhoneNumberDisplayUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/com/android/dialer/calllog/PhoneNumberDisplayUtil.java b/src/com/android/dialer/calllog/PhoneNumberDisplayUtil.java index 91cd3e1f0..09b42e9f6 100644 --- a/src/com/android/dialer/calllog/PhoneNumberDisplayUtil.java +++ b/src/com/android/dialer/calllog/PhoneNumberDisplayUtil.java @@ -78,7 +78,7 @@ public class PhoneNumberDisplayUtil { } else if (!TextUtils.isEmpty(number)) { return number.toString() + postDialDigits; } else { - return ""; + return context.getResources().getString(R.string.unknown); } } -- cgit v1.2.3