Don't stop MediaPlayers before releasing them

Fixes #5298
Closes #5303

// FREEBIE
fork-5.53.8
haffenloher 2016-02-29 17:25:26 +01:00
rodzic 24d103df8f
commit fa22fb7550
2 zmienionych plików z 4 dodań i 8 usunięć

Wyświetl plik

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

Wyświetl plik

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