Fix ringing calls not stopping when the other user cancels the call (#4613)
* Fix ringing calls not being automatically canceled This will keep the sync active while the user is screening an incoming call, allowing receiving a call cancellation event, which will terminate the incoming call ringing early. * Add extra logs to help debugging ringing call issues.
This commit is contained in:
parent
75cb3156a1
commit
3b35d96e1a
10 changed files with 112 additions and 17 deletions
|
|
@ -13,11 +13,13 @@ import kotlinx.coroutines.flow.MutableStateFlow
|
|||
class FakeAppForegroundStateService(
|
||||
initialForegroundValue: Boolean = true,
|
||||
initialIsInCallValue: Boolean = false,
|
||||
initialIsSyncingNotificationEventValue: Boolean = false
|
||||
initialIsSyncingNotificationEventValue: Boolean = false,
|
||||
initialHasRingingCall: Boolean = false,
|
||||
) : AppForegroundStateService {
|
||||
override val isInForeground = MutableStateFlow(initialForegroundValue)
|
||||
override val isInCall = MutableStateFlow(initialIsInCallValue)
|
||||
override val isSyncingNotificationEvent = MutableStateFlow(initialIsSyncingNotificationEventValue)
|
||||
override val hasRingingCall = MutableStateFlow(initialHasRingingCall)
|
||||
|
||||
override fun startObservingForeground() {
|
||||
// No-op
|
||||
|
|
@ -34,4 +36,8 @@ class FakeAppForegroundStateService(
|
|||
override fun updateIsSyncingNotificationEvent(isSyncingNotificationEvent: Boolean) {
|
||||
this.isSyncingNotificationEvent.value = isSyncingNotificationEvent
|
||||
}
|
||||
|
||||
override fun updateHasRingingCall(hasRingingCall: Boolean) {
|
||||
this.hasRingingCall.value = hasRingingCall
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue