mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-24 16:57:50 +00:00
Don't stop MediaPlayers before releasing them
Fixes #5298 Closes #5303 // FREEBIE
This commit is contained in:
parent
24d103df8f
commit
fa22fb7550
@ -109,7 +109,6 @@ public class IncomingRinger {
|
||||
public void stop() {
|
||||
if (player != null) {
|
||||
Log.d(TAG, "Stopping ringer");
|
||||
player.stop();
|
||||
player.release();
|
||||
player = null;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user