Fixed issue with TelecomManager not disconnecting when call state is Error

This commit is contained in:
Sylvain Berfini 2024-12-17 10:10:54 +01:00
parent 372a16d3ab
commit 7c755bd080

View file

@ -75,9 +75,14 @@ class TelecomCallControlCallback(
}
} else if (state == Call.State.End) {
scope.launch {
Log.i("$TAG Disconnecting call")
Log.i("$TAG Disconnecting call because it has ended")
callControl.disconnect(DisconnectCause(DisconnectCause.LOCAL))
}
} else if (state == Call.State.Error) {
scope.launch {
Log.w("$TAG Disconnecting call due to error [$message]")
callControl.disconnect(DisconnectCause(DisconnectCause.ERROR))
}
} else if (state == Call.State.Pausing) {
scope.launch {
Log.i("$TAG Pausing call")