mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-24 02:25:19 +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()) {
|
||||||
am.startBluetoothSco();
|
try {
|
||||||
am.setBluetoothScoOn(true);
|
am.startBluetoothSco();
|
||||||
|
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