Don't stop MediaPlayers before releasing them

Fixes #5298
Closes #5303

// FREEBIE
This commit is contained in:
haffenloher 2016-02-29 17:25:26 +01:00
parent 24d103df8f
commit fa22fb7550
2 changed files with 4 additions and 8 deletions

View File

@ -109,7 +109,6 @@ public class IncomingRinger {
public void stop() {
if (player != null) {
Log.d(TAG, "Stopping ringer");
player.stop();
player.release();
player = null;
}

View File

@ -112,13 +112,10 @@ public class OutgoingRinger implements MediaPlayer.OnCompletionListener, MediaPl
}
public void stop() {
if( mediaPlayer == null ) return;
try {
mediaPlayer.stop();
mediaPlayer.release();
mediaPlayer = null;
} catch( IllegalStateException e ) {
}
if (mediaPlayer == null) return;
mediaPlayer.release();
mediaPlayer = null;
currentSoundID = -1;
}