diff options
author | Andrew Lee <anwlee@google.com> | 2015-10-12 19:22:21 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-10-12 19:22:21 +0000 |
commit | 46b15454997b85bd28d3be2559ba103f8e224de2 (patch) | |
tree | 7cd43d513954aa95bf5b567aae30424f0f57514e | |
parent | d022ce93d3001d03b62dd7f4e0d7209d298c2124 (diff) | |
parent | f72637df6ee6cc0c5bc66205199ed6294f2eb623 (diff) |
am f72637df: DO NOT MERGE Handle null contact lookup.
* commit 'f72637df6ee6cc0c5bc66205199ed6294f2eb623':
DO NOT MERGE Handle null contact lookup.
-rw-r--r-- | src/com/android/dialer/calllog/CallLogAsyncTaskUtil.java | 10 |
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); |