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() {
|
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;
|
||||||
}
|
}
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user