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

Commit e1bd048c authored by Marco Nelissen's avatar Marco Nelissen
Browse files

Release MediaPlayer before letting it go out of scope.

Change-Id: Ib2b727146f6cba91b131e66d218251f5a3206fac
parent 40047fa1
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);