android: current audio device will be set in init step (#4071)

This commit is contained in:
Stanislav Dmitrenko
2024-04-24 00:47:15 +07:00
committed by GitHub
parent ae9e63d1be
commit 2f79bfb075
2 changed files with 2 additions and 1 deletions

View File

@@ -65,6 +65,7 @@ class PostSCallAudioDeviceManager: CallAudioDeviceManagerInterface {
override fun start() {
am.mode = AudioManager.MODE_IN_COMMUNICATION
currentDevice.value = am.communicationDevice
am.registerAudioDeviceCallback(audioCallback, null)
am.addOnCommunicationDeviceChangedListener(Executors.newSingleThreadExecutor(), listener)
}

View File

@@ -94,8 +94,8 @@ actual fun ActiveCallView() {
if (wasConnected.value) {
CallSoundsPlayer.vibrate()
}
dropAudioManagerOverrides()
callAudioDeviceManager.stop()
dropAudioManagerOverrides()
if (proximityLock?.isHeld == true) {
proximityLock.release()
}