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() { public void stop() {
if (player != null) { if (player != null) {
Log.d(TAG, "Stopping ringer"); Log.d(TAG, "Stopping ringer");
player.stop();
player.release(); player.release();
player = null; player = null;
} }

View File

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