diff options
author | Sarmad Hashmi <mhashmi@google.com> | 2016-03-18 17:22:04 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2016-03-18 17:22:04 +0000 |
commit | 74a4339953bf2a41a4cd1e73a88b0edfafa50585 (patch) | |
tree | 09915331796ce930ba8be6f053bdf471cdb45919 /src/com | |
parent | 3023298a09f00b57fee6c2a3bc15c85294fa6ca4 (diff) | |
parent | 5da20d4e84c475aadfed3cfc3e4ea06d4400091c (diff) |
Merge "Fix dialer crash on unknown number call." into nyc-dev
am: 5da20d4
* commit '5da20d4e84c475aadfed3cfc3e4ea06d4400091c':
Fix dialer crash on unknown number call.
Diffstat (limited to 'src/com')
-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); |