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

Commit d94a7b60 authored by Marco Nelissen's avatar Marco Nelissen Committed by Android (Google) Code Review
Browse files

Merge "Release MediaPlayer before letting it go out of scope."

parents cc3fbb7b e1bd048c
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -166,6 +166,9 @@ public class Ringtone {
    }
    
    private void openMediaPlayer() throws IOException {
        if (mAudio != null) {
            mAudio.release();
        }
        mAudio = new MediaPlayer();
        if (mUri != null) {
            mAudio.setDataSource(mContext, mUri);