diff options
author | Sarmad Hashmi <mhashmi@google.com> | 2016-03-18 17:25:00 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2016-03-18 17:25:00 +0000 |
commit | ec3703fed0e14c03b53ccee6b39c638c8b7d50b4 (patch) | |
tree | 763a4a4d9a2bb7ebe55718ceec9c807094dea833 /src/com/android/dialer/calllog | |
parent | 5b7c21dbca2f8f7a57a8481ae2e558ce4e7f2db3 (diff) | |
parent | 74a4339953bf2a41a4cd1e73a88b0edfafa50585 (diff) |
Merge "Fix dialer crash on unknown number call." into nyc-dev am: 5da20d4
am: 74a4339
* commit '74a4339953bf2a41a4cd1e73a88b0edfafa50585':
Fix dialer crash on unknown number call.
Diffstat (limited to 'src/com/android/dialer/calllog')
-rw-r--r-- | src/com/android/dialer/calllog/CallLogNotificationsHelper.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/com/android/dialer/calllog/CallLogNotificationsHelper.java b/src/com/android/dialer/calllog/CallLogNotificationsHelper.java index 189263199..9a5028460 100644 --- a/src/com/android/dialer/calllog/CallLogNotificationsHelper.java +++ b/src/com/android/dialer/calllog/CallLogNotificationsHelper.java @@ -16,6 +16,8 @@ package com.android.dialer.calllog; +import com.google.common.base.Strings; + import android.Manifest; import android.content.ContentResolver; import android.content.ContentUris; @@ -112,12 +114,13 @@ public class CallLogNotificationsHelper { * Otherwise attempt to look it up in the cache. * If that fails, fall back to displaying the number. */ - public @NonNull ContactInfo getContactInfo(@Nullable String number, int numberPresentation, + public ContactInfo getContactInfo(@Nullable String number, int numberPresentation, @Nullable String countryIso) { if (countryIso == null) { countryIso = mCurrentCountryIso; } + number = Strings.nullToEmpty(number); ContactInfo contactInfo = new ContactInfo(); contactInfo.number = number; contactInfo.formattedNumber = PhoneNumberUtils.formatNumber(number, countryIso); |