summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Lee <anwlee@google.com>2015-10-12 19:26:36 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-10-12 19:26:36 +0000
commitebc4a0ff768af67a392c1f173188a0b051d0e626 (patch)
tree2d5402b5c4959817d09e629cb8ff9654b7a8d591
parentd71a3eef4ee4a40a0adbcd2beb5efc3ce125e537 (diff)
parent46b15454997b85bd28d3be2559ba103f8e224de2 (diff)
am 46b15454: am f72637df: DO NOT MERGE Handle null contact lookup.
* commit '46b15454997b85bd28d3be2559ba103f8e224de2': DO NOT MERGE Handle null contact lookup.
-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);