mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 11:28:06 +00:00
Should fix hearing aids issue
This commit is contained in:
parent
eadb1d0eb2
commit
839e96a194
3 changed files with 10 additions and 2 deletions
|
|
@ -229,7 +229,7 @@ class TelecomCallControlCallback(
|
|||
routes.find { it == AudioDevice.Type.Speaker }
|
||||
}
|
||||
CallEndpointCompat.Companion.TYPE_BLUETOOTH -> {
|
||||
routes.find { it == AudioDevice.Type.Bluetooth }
|
||||
routes.find { it == AudioDevice.Type.Bluetooth || it == AudioDevice.Type.HearingAid }
|
||||
}
|
||||
CallEndpointCompat.Companion.TYPE_WIRED_HEADSET -> {
|
||||
wiredHeadsetFound = true
|
||||
|
|
|
|||
|
|
@ -757,7 +757,10 @@ class CurrentCallViewModel
|
|||
AudioDevice.Type.Headset, AudioDevice.Type.Headphones -> AudioUtils.routeAudioToHeadset(
|
||||
currentCall
|
||||
)
|
||||
AudioDevice.Type.Bluetooth, AudioDevice.Type.HearingAid -> AudioUtils.routeAudioToBluetooth(
|
||||
AudioDevice.Type.Bluetooth -> AudioUtils.routeAudioToBluetooth(
|
||||
currentCall
|
||||
)
|
||||
AudioDevice.Type.HearingAid -> AudioUtils.routeAudioToHearingAid(
|
||||
currentCall
|
||||
)
|
||||
AudioDevice.Type.Speaker -> AudioUtils.routeAudioToSpeaker(
|
||||
|
|
|
|||
|
|
@ -50,6 +50,11 @@ class AudioUtils {
|
|||
routeAudioTo(call, arrayListOf(AudioDevice.Type.Bluetooth))
|
||||
}
|
||||
|
||||
@WorkerThread
|
||||
fun routeAudioToHearingAid(call: Call? = null) {
|
||||
routeAudioTo(call, arrayListOf(AudioDevice.Type.HearingAid))
|
||||
}
|
||||
|
||||
@WorkerThread
|
||||
fun routeAudioToHeadset(call: Call? = null) {
|
||||
routeAudioTo(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue