mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-03-30 20:45:49 +00:00
android: current audio device will be set in init step (#4071)
This commit is contained in:
committed by
GitHub
parent
ae9e63d1be
commit
2f79bfb075
@@ -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)
|
||||
}
|
||||
|
||||
@@ -94,8 +94,8 @@ actual fun ActiveCallView() {
|
||||
if (wasConnected.value) {
|
||||
CallSoundsPlayer.vibrate()
|
||||
}
|
||||
dropAudioManagerOverrides()
|
||||
callAudioDeviceManager.stop()
|
||||
dropAudioManagerOverrides()
|
||||
if (proximityLock?.isHeld == true) {
|
||||
proximityLock.release()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user