mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-27 20:15:21 +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);
|
AudioManager am = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE);
|
||||||
|
|
||||||
if (am.isBluetoothScoAvailableOffCall()) {
|
if (am.isBluetoothScoAvailableOffCall()) {
|
||||||
|
try {
|
||||||
am.startBluetoothSco();
|
am.startBluetoothSco();
|
||||||
am.setBluetoothScoOn(true);
|
am.setBluetoothScoOn(true);
|
||||||
|
} catch (NullPointerException e) {
|
||||||
|
// Lollipop bug (https://stackoverflow.com/questions/26642218/audiomanager-startbluetoothsco-crashes-on-android-lollipop)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mediaPlayer.start();
|
mediaPlayer.start();
|
||||||
|
Loading…
Reference in New Issue
Block a user