mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-10-31 16:22:49 +00:00
Compile with SDK 37
This commit is contained in:
committed by
Benoit Marty
parent
405fd3ca0d
commit
e54d93cd50
+1
-3
@@ -207,7 +207,6 @@ class WebViewAudioManager(
|
||||
}
|
||||
|
||||
audioManager.mode = AudioManager.MODE_NORMAL
|
||||
|
||||
if (!hasRegisteredCallbacks) {
|
||||
Timber.w("Audio: tried to disable webview in-call audio mode without registering callbacks")
|
||||
return
|
||||
@@ -342,6 +341,7 @@ class WebViewAudioManager(
|
||||
} else {
|
||||
// On Android 11 and lower, we don't have the concept of communication devices
|
||||
// We have to call the right methods based on the device type
|
||||
@Suppress("DEPRECATION")
|
||||
if (device != null) {
|
||||
if (device.type == AudioDeviceInfo.TYPE_BLUETOOTH_SCO && disableBluetoothAudioDevices) {
|
||||
Timber.w("Bluetooth audio devices are disabled on this Android version")
|
||||
@@ -350,11 +350,9 @@ class WebViewAudioManager(
|
||||
return
|
||||
}
|
||||
setAudioEnabled(true)
|
||||
@Suppress("DEPRECATION")
|
||||
isSpeakerphoneOn = device.type == AudioDeviceInfo.TYPE_BUILTIN_SPEAKER
|
||||
isBluetoothScoOn = device.type == AudioDeviceInfo.TYPE_BLUETOOTH_SCO
|
||||
} else {
|
||||
@Suppress("DEPRECATION")
|
||||
isSpeakerphoneOn = false
|
||||
isBluetoothScoOn = false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user