Commit 7d9329ad authored by Simon Morlat's avatar Simon Morlat
Browse files

Don't pause all calls when receiving a new call. This creates recursions in...

Don't pause all calls when receiving a new call. This creates recursions in callkit's logic that cause AudioSession to be lost. Call fulfill() when action is done.
parent 831295f6
Pipeline #28776 passed with stage
in 4 minutes and 30 seconds
......@@ -90,7 +90,7 @@ class ProviderDelegate: NSObject {
let callInfo = callInfos[uuid]
let callId = callInfo?.callId
Log.directLog(BCTBX_LOG_MESSAGE, text: "CallKit: report new incoming call with call-id: [\(String(describing: callId))] and UUID: [\(uuid.description)]")
CallManager.instance().setHeldOtherCalls(exceptCallid: callId ?? "")
//CallManager.instance().setHeldOtherCalls(exceptCallid: callId ?? "")
provider.reportNewIncomingCall(with: uuid, update: update) { error in
if error == nil {
if CallManager.instance().endCallkit {
......@@ -155,7 +155,7 @@ class ProviderDelegate: NSObject {
// MARK: - CXProviderDelegate
extension ProviderDelegate: CXProviderDelegate {
func provider(_ provider: CXProvider, perform action: CXEndCallAction) {
action.fulfill()
let uuid = action.callUUID
let callId = callInfos[uuid]?.callId
......@@ -170,6 +170,7 @@ extension ProviderDelegate: CXProviderDelegate {
CallManager.instance().terminateCall(call: call.getCobject);
Log.directLog(BCTBX_LOG_MESSAGE, text: "CallKit: Call ended with call-id: \(String(describing: callId)) an UUID: \(uuid.description).")
}
action.fulfill()
}
func provider(_ provider: CXProvider, perform action: CXAnswerCallAction) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment