diff options
author | Nancy Chen <nancychen@google.com> | 2015-06-23 16:12:20 -0700 |
---|---|---|
committer | Nancy Chen <nancychen@google.com> | 2015-06-23 16:12:20 -0700 |
commit | 592a91317218204f6dedeb47473a1cc7f02dab09 (patch) | |
tree | 0382869f87379dfb4333b061a423c3eb17b81151 /src | |
parent | 8f25a4d230989a184aa64c80330503d3fabe8490 (diff) |
Fix potential crash if uri is unavailable.
If the voicemail is in the process of deleting, the uri may be
unavailable after the async task has started executing. Make a null
check first.
Bug: 21978479
Change-Id: I0ec93e66b055c4e5d9ce2743a3cffc689c835f78
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/dialer/voicemail/VoicemailPlaybackPresenter.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/com/android/dialer/voicemail/VoicemailPlaybackPresenter.java b/src/com/android/dialer/voicemail/VoicemailPlaybackPresenter.java index 5e75ca7e2..e1ad20b64 100644 --- a/src/com/android/dialer/voicemail/VoicemailPlaybackPresenter.java +++ b/src/com/android/dialer/voicemail/VoicemailPlaybackPresenter.java @@ -337,6 +337,10 @@ public class VoicemailPlaybackPresenter } private boolean queryHasContent(Uri voicemailUri) { + if (voicemailUri == null) { + return false; + } + ContentResolver contentResolver = mContext.getContentResolver(); Cursor cursor = contentResolver.query( voicemailUri, HAS_CONTENT_PROJECTION, null, null, null); |