Format number of new voicemail before displaying.
Format the number of the new voicemail for display to improve
readability and announce the number with individual digits in text-to-speech.
Bug: 25122678
Change-Id: I96ef815db72b5b0571f9dd662d68f4f6cc6d0416
diff --git a/src/com/android/dialer/calllog/DefaultVoicemailNotifier.java b/src/com/android/dialer/calllog/DefaultVoicemailNotifier.java
index 635e874..ff91372 100644
--- a/src/com/android/dialer/calllog/DefaultVoicemailNotifier.java
+++ b/src/com/android/dialer/calllog/DefaultVoicemailNotifier.java
@@ -31,6 +31,7 @@
import android.net.Uri;
import android.provider.CallLog.Calls;
import android.provider.ContactsContract.PhoneLookup;
+import android.telephony.PhoneNumberUtils;
import android.text.TextUtils;
import android.util.Log;
@@ -153,7 +154,7 @@
// Look it up in the database.
name = mNameLookupQuery.query(newCall.number);
if (TextUtils.isEmpty(name)) {
- name = newCall.number;
+ name = PhoneNumberUtils.formatNumber(newCall.number, newCall.countryIso);
}
}
names.put(newCall.number, name);