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
diff --git a/src/com/android/dialer/calllog/CallLogListItemViewHolder.java b/src/com/android/dialer/calllog/CallLogListItemViewHolder.java
index 1bc4410..a5b1e8d 100644
--- a/src/com/android/dialer/calllog/CallLogListItemViewHolder.java
+++ b/src/com/android/dialer/calllog/CallLogListItemViewHolder.java
@@ -467,7 +467,8 @@
}
// 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);