Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 592a9131 authored by Nancy Chen's avatar Nancy Chen
Browse files

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
parent 8f25a4d2
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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);