summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/com/android/dialer/calllog/CallLogAsyncTaskUtil.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/com/android/dialer/calllog/CallLogAsyncTaskUtil.java b/src/com/android/dialer/calllog/CallLogAsyncTaskUtil.java
index 1becc89af..22dece57c 100644
--- a/src/com/android/dialer/calllog/CallLogAsyncTaskUtil.java
+++ b/src/com/android/dialer/calllog/CallLogAsyncTaskUtil.java
@@ -155,9 +155,13 @@ public class CallLogAsyncTaskUtil {
boolean isVoicemail = PhoneNumberUtil.isVoicemailNumber(context, accountHandle, number);
boolean shouldLookupNumber =
PhoneNumberUtil.canPlaceCallsTo(number, numberPresentation) && !isVoicemail;
- ContactInfo info = shouldLookupNumber
- ? contactInfoHelper.lookupNumber(number, countryIso)
- : ContactInfo.EMPTY;
+
+ ContactInfo info = ContactInfo.EMPTY;
+ if (shouldLookupNumber) {
+ ContactInfo lookupInfo = contactInfoHelper.lookupNumber(number, countryIso);
+ info = lookupInfo != null ? lookupInfo : ContactInfo.EMPTY;
+ }
+
PhoneCallDetails details = new PhoneCallDetails(
context, number, numberPresentation, info.formattedNumber, isVoicemail);