diff options
author | Nancy Chen <nancychen@google.com> | 2015-03-23 18:08:24 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-03-23 18:08:25 +0000 |
commit | 72c9053eda382ef3e4450b657801898aced8f904 (patch) | |
tree | b73e93e62c199c211fa12756c565132b8be0ed3e | |
parent | a42f9b7a68a1d9a34b28632a686bceeafe70a5e4 (diff) | |
parent | 164d9d5cd6d6e723b1af9a565f588cc1b5b09c6c (diff) |
Merge "Fix NPE in call detail activity for voicemails."
-rw-r--r-- | src/com/android/dialer/CallDetailActivity.java | 3 | ||||
-rw-r--r-- | src/com/android/dialer/calllog/PhoneNumberDisplayHelper.java | 1 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/com/android/dialer/CallDetailActivity.java b/src/com/android/dialer/CallDetailActivity.java index 69242d3da..5dae9d07d 100644 --- a/src/com/android/dialer/CallDetailActivity.java +++ b/src/com/android/dialer/CallDetailActivity.java @@ -367,7 +367,8 @@ public class CallDetailActivity extends Activity implements ProximitySensorAware // We know that all calls are from the same number and the same contact, so pick the // first. PhoneCallDetails firstDetails = details[0]; - mNumber = firstDetails.number.toString(); + mNumber = TextUtils.isEmpty(firstDetails.number) ? + null : firstDetails.number.toString(); final int numberPresentation = firstDetails.numberPresentation; final Uri contactUri = firstDetails.contactUri; final Uri photoUri = firstDetails.photoUri; diff --git a/src/com/android/dialer/calllog/PhoneNumberDisplayHelper.java b/src/com/android/dialer/calllog/PhoneNumberDisplayHelper.java index 0dffd868a..c1a5abfe1 100644 --- a/src/com/android/dialer/calllog/PhoneNumberDisplayHelper.java +++ b/src/com/android/dialer/calllog/PhoneNumberDisplayHelper.java @@ -75,7 +75,6 @@ public class PhoneNumberDisplayHelper { */ public CharSequence getDisplayNumber(PhoneAccountHandle accountHandle, CharSequence number, int presentation, CharSequence formattedNumber) { - final CharSequence displayName = getDisplayName(accountHandle, number, presentation); if (!TextUtils.isEmpty(displayName)) { return displayName; |