Compile with SDK 37

This commit is contained in:
Benoit Marty
2026-06-11 14:48:39 +02:00
committed by Benoit Marty
parent 405fd3ca0d
commit e54d93cd50
3 changed files with 4 additions and 5 deletions
@@ -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
}