diff options
-rw-r--r-- | java/com/android/dialer/app/calllog/CallLogAdapter.java | 7 | ||||
-rw-r--r-- | java/com/android/dialer/app/calllog/CallLogListItemViewHolder.java | 6 |
2 files changed, 9 insertions, 4 deletions
diff --git a/java/com/android/dialer/app/calllog/CallLogAdapter.java b/java/com/android/dialer/app/calllog/CallLogAdapter.java index bd7cf7715..5fcf59b28 100644 --- a/java/com/android/dialer/app/calllog/CallLogAdapter.java +++ b/java/com/android/dialer/app/calllog/CallLogAdapter.java @@ -344,8 +344,11 @@ public class CallLogAdapter extends GroupingListAdapter // If enriched call capabilities were unknown on the initial load, // viewHolder.isCallComposerCapable may be unset. Check here if we have the capabilities // as a last attempt at getting them before showing the expanded view to the user - EnrichedCallCapabilities capabilities = - getEnrichedCallManager().getCapabilities(viewHolder.number); + EnrichedCallCapabilities capabilities = null; + + if (viewHolder.number != null) { + capabilities = getEnrichedCallManager().getCapabilities(viewHolder.number); + } if (capabilities == null) { capabilities = EnrichedCallCapabilities.NO_CAPABILITIES; diff --git a/java/com/android/dialer/app/calllog/CallLogListItemViewHolder.java b/java/com/android/dialer/app/calllog/CallLogListItemViewHolder.java index 01abb47a2..23a00d745 100644 --- a/java/com/android/dialer/app/calllog/CallLogListItemViewHolder.java +++ b/java/com/android/dialer/app/calllog/CallLogListItemViewHolder.java @@ -164,7 +164,7 @@ public final class CallLogListItemViewHolder extends RecyclerView.ViewHolder * The callable phone number for the current call log entry. Cached here as the call back intent * is set only when the actions ViewStub is inflated. */ - public String number; + @Nullable public String number; /** The post-dial numbers that are dialed following the phone number. */ public String postDialDigits; /** The formatted phone number to display. */ @@ -933,7 +933,9 @@ public final class CallLogListItemViewHolder extends RecyclerView.ViewHolder contact.setNameOrNumber((String) nameOrNumber); } contact.setContactType(getContactType()); - contact.setNumber(number); + if (number != null) { + contact.setNumber(number); + } /* second line of contact view. */ if (!TextUtils.isEmpty(info.name)) { contact.setDisplayNumber(displayNumber); |