From 52cd5fd66d0b97e066f89281eb55016dedfeec3a Mon Sep 17 00:00:00 2001 From: Yorke Lee Date: Wed, 9 Dec 2015 11:40:15 -0800 Subject: Fix potential NPE in DefaultVoicemailNotifier Don't try to format an empty number Bug: 26095129 Change-Id: I6356c24e03066babd22217b24004f9ae9a53a67b --- src/com/android/dialer/calllog/DefaultVoicemailNotifier.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/com') diff --git a/src/com/android/dialer/calllog/DefaultVoicemailNotifier.java b/src/com/android/dialer/calllog/DefaultVoicemailNotifier.java index c40c99384..2b894a12d 100644 --- a/src/com/android/dialer/calllog/DefaultVoicemailNotifier.java +++ b/src/com/android/dialer/calllog/DefaultVoicemailNotifier.java @@ -154,7 +154,7 @@ public class DefaultVoicemailNotifier { if (TextUtils.isEmpty(name)) { // Look it up in the database. name = mNameLookupQuery.query(newCall.number); - if (TextUtils.isEmpty(name)) { + if (TextUtils.isEmpty(name) && !TextUtils.isEmpty(newCall.number)) { name = PhoneNumberUtils.formatNumber(newCall.number, newCall.countryIso); } } -- cgit v1.2.3