- Upon GSM interruption handle conference cases by leave()/enter()

- Upon StreamsRunning call state update in conference check and set locallyPaused flag.
This commit is contained in:
Christophe Deschamps 2023-04-04 08:59:35 +02:00 committed by Sylvain Berfini
parent d54a707816
commit e725eb4e7b
2 changed files with 19 additions and 2 deletions

View file

@ -257,6 +257,13 @@ class ConferenceViewModel : ViewModel() {
waitForNextStreamsRunningToUpdateLayout = false waitForNextStreamsRunningToUpdateLayout = false
reloadConferenceFragmentEvent.value = Event(true) reloadConferenceFragmentEvent.value = Event(true)
} }
if (state == Call.State.StreamsRunning && call.conference?.isIn == true) {
isConferenceLocallyPaused.value = false
conferenceParticipantDevices.value?.forEach {
if (it.isMe)
it.isInConference.value = true
}
}
} }
} }

View file

@ -63,13 +63,23 @@ class NativeCallWrapper(var callId: String) : Connection() {
override fun onHold() { override fun onHold() {
Log.i("[Connection] Pausing telecom call with id: $callId") Log.i("[Connection] Pausing telecom call with id: $callId")
getCall()?.pause() ?: selfDestroy() getCall()?.let { call ->
if (call.conference != null)
call.conference?.leave()
else
call.pause()
} ?: selfDestroy()
setOnHold() setOnHold()
} }
override fun onUnhold() { override fun onUnhold() {
Log.i("[Connection] Resuming telecom call with id: $callId") Log.i("[Connection] Resuming telecom call with id: $callId")
getCall()?.resume() ?: selfDestroy() getCall()?.let { call ->
if (call.conference != null)
call.conference?.enter()
else
call.resume()
} ?: selfDestroy()
setActive() setActive()
} }