mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 11:28:06 +00:00
Fixed muted call if Telecom Manager requested a quick mute/unmute
This commit is contained in:
parent
3f47832b02
commit
c5550bc78d
1 changed files with 6 additions and 2 deletions
|
|
@ -57,6 +57,8 @@ class TelecomCallControlCallback(
|
|||
private var endpointUpdateRequestFromLinphone: Boolean = false
|
||||
private var latestLinphoneRequestedEndpoint: CallEndpointCompat? = null
|
||||
|
||||
private var mutedByTelecomManager = false
|
||||
|
||||
private val callListener = object : CallListenerStub() {
|
||||
@WorkerThread
|
||||
override fun onStateChanged(call: Call, state: Call.State?, message: String) {
|
||||
|
|
@ -201,8 +203,10 @@ class TelecomCallControlCallback(
|
|||
"$TAG We're asked to [${if (muted) "mute" else "unmute"}] the call in state [$callState]"
|
||||
)
|
||||
// Only follow un-mute requests for not outgoing calls (such as joining a conference muted)
|
||||
// and if connected to Android Auto that has a way to let user mute/unmute from the car directly.
|
||||
if (muted || (!LinphoneUtils.isCallOutgoing(callState, false) && coreContext.isConnectedToAndroidAuto)) {
|
||||
// and if connected to Android Auto that has a way to let user mute/unmute from the car directly
|
||||
// or if we muted the call previously following Telecom Manager request.
|
||||
if (muted || mutedByTelecomManager || (!LinphoneUtils.isCallOutgoing(callState, false) && coreContext.isConnectedToAndroidAuto)) {
|
||||
mutedByTelecomManager = muted
|
||||
call.microphoneMuted = muted
|
||||
coreContext.refreshMicrophoneMuteStateEvent.postValue(Event(true))
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue