mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-23 18:15:22 +00:00
parent
0402b45480
commit
7f59983ce4
@ -135,8 +135,12 @@ public class OutgoingRinger implements MediaPlayer.OnCompletionListener, MediaPl
|
||||
AudioManager am = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE);
|
||||
|
||||
if (am.isBluetoothScoAvailableOffCall()) {
|
||||
am.startBluetoothSco();
|
||||
am.setBluetoothScoOn(true);
|
||||
try {
|
||||
am.startBluetoothSco();
|
||||
am.setBluetoothScoOn(true);
|
||||
} catch (NullPointerException e) {
|
||||
// Lollipop bug (https://stackoverflow.com/questions/26642218/audiomanager-startbluetoothsco-crashes-on-android-lollipop)
|
||||
}
|
||||
}
|
||||
|
||||
mediaPlayer.start();
|
||||
|
Loading…
Reference in New Issue
Block a user