Attempt to not rely on TelecomCallControlCallback endpoint API

This commit is contained in:
Sylvain Berfini 2025-09-18 18:40:40 +02:00
parent 31e15ddfca
commit 9066d41daa
2 changed files with 8 additions and 4 deletions

View file

@ -143,7 +143,9 @@ class TelecomCallControlCallback(
}.launchIn(scope)
callControl.currentCallEndpoint.onEach { endpoint ->
var newEndpointToUse = endpoint
return@onEach
/*var newEndpointToUse = endpoint
if (endpointUpdateRequestFromLinphone) {
Log.i("$TAG Linphone requests to use [${endpoint.name}] audio endpoint with type [${endpointTypeToString(endpoint.type)}]")
} else {
@ -193,7 +195,7 @@ class TelecomCallControlCallback(
}, 200)
}
}
}
}*/
}.launchIn(scope)
callControl.isMuted.onEach { muted ->

View file

@ -95,7 +95,7 @@ class AudioUtils {
null
}
if (!skipTelecom) {
/*if (!skipTelecom) {
val callId = currentCall?.callLog?.callId.orEmpty()
Log.i("$TAG Trying to change audio endpoint using Telecom Manager APIs")
val success = coreContext.telecomManager.applyAudioRouteToCallWithId(types, callId)
@ -109,7 +109,9 @@ class AudioUtils {
} else {
Log.i("$TAG Trying to change audio endpoint directly in Linphone SDK")
applyAudioRouteChangeInLinphone(currentCall, types, output)
}
}*/
Log.i("$TAG Trying to change audio endpoint directly in Linphone SDK")
applyAudioRouteChangeInLinphone(currentCall, types, output)
}
fun applyAudioRouteChangeInLinphone(