diff options
author | Nancy Chen <nancychen@google.com> | 2015-11-03 15:01:39 -0800 |
---|---|---|
committer | Nancy Chen <nancychen@google.com> | 2015-11-03 15:01:39 -0800 |
commit | c2cec8acda1a6f32af116cdd253261f54ebeadb2 (patch) | |
tree | f3c53bb8b1188b4d9bca86ada9ab610ffa8c2b35 | |
parent | cdd20a38dd669fea7de380fdc58fb526cb8d6581 (diff) |
Fix NPE in For Voicemail item without Uri.
Having a voicemail with no voicemail URI should not happen, but if it does,
the app should not crash.
Bug:25425730
Change-Id: I38cac03316432d2400a5eb23ebacf71fd94e75ee
-rw-r--r-- | src/com/android/dialer/calllog/CallLogListItemViewHolder.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/com/android/dialer/calllog/CallLogListItemViewHolder.java b/src/com/android/dialer/calllog/CallLogListItemViewHolder.java index 1bc44108d..a5b1e8dd2 100644 --- a/src/com/android/dialer/calllog/CallLogListItemViewHolder.java +++ b/src/com/android/dialer/calllog/CallLogListItemViewHolder.java @@ -467,7 +467,8 @@ public final class CallLogListItemViewHolder extends RecyclerView.ViewHolder } // For voicemail calls, show the voicemail playback layout; hide otherwise. - if (callType == Calls.VOICEMAIL_TYPE && mVoicemailPlaybackPresenter != null) { + if (callType == Calls.VOICEMAIL_TYPE && mVoicemailPlaybackPresenter != null + && !TextUtils.isEmpty(voicemailUri)) { voicemailPlaybackView.setVisibility(View.VISIBLE); Uri uri = Uri.parse(voicemailUri); |