Release MediaPlayer before letting it go out of scope.
Change-Id: Ib2b727146f6cba91b131e66d218251f5a3206fac
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user