From c2cec8acda1a6f32af116cdd253261f54ebeadb2 Mon Sep 17 00:00:00 2001 From: Nancy Chen Date: Tue, 3 Nov 2015 15:01:39 -0800 Subject: 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 --- src/com/android/dialer/calllog/CallLogListItemViewHolder.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') 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); -- cgit v1.2.3