Release MediaPlayer before letting it go out of scope.

Change-Id: Ib2b727146f6cba91b131e66d218251f5a3206fac
This commit is contained in:
Marco Nelissen
2011-09-29 09:59:03 -07:00
parent 40047fa14d
commit e1bd048cf2

View File

@@ -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);