When Earpiece or Speaker audio route is requested, set the capture device to Micrphone

This commit is contained in:
Christophe Deschamps 2022-04-28 17:12:57 +02:00 committed by Sylvain Berfini
parent 9059abbc06
commit 2be69da8a4

View file

@ -93,6 +93,10 @@ class AudioRouteUtils {
applyAudioRouteChange(call, (arrayListOf(AudioDevice.Type.Headphones, AudioDevice.Type.Headset)), false)
}
}
AudioDevice.Type.Earpiece, AudioDevice.Type.Speaker -> {
Log.i("[Audio Route Helper] Audio route requested to Earpice or speaker, setting input to Microphone")
applyAudioRouteChange(call, (arrayListOf(AudioDevice.Type.Microphone)), false)
}
}
}