WIP: incoming non-signal call while in outgoing signal call

Marking Signal-Call as started, changes the incoming call screen for
subsequent calls to show "Accept & End", "Send to VoiceMail" and "Accept
& Hold" instead of just "Accept" & "Decline"

Though - we don't support Holding. What we really want to see is just
"Accept & End" and "Decline | Send to Voicemail"

// FREEBIE
pull/1/head
Michael Kirk 8 years ago
parent 08a0853bd2
commit e425d351c7

@ -138,8 +138,7 @@ final class CallKitCallUIAdaptee: NSObject, CallUIAdaptee, CXProviderDelegate {
func recipientAcceptedCall(_ call: SignalCall) {
AssertIsOnMainThread()
// no - op
// TODO provider update call connected?
self.provider.reportOutgoingCall(with: call.localId, connectedAt: nil)
}
func localHangupCall(_ call: SignalCall) {
@ -213,27 +212,15 @@ final class CallKitCallUIAdaptee: NSObject, CallUIAdaptee, CXProviderDelegate {
}
CallService.signalingQueue.async {
self.callService.handleOutgoingCall(call).then {
self.callService.handleOutgoingCall(call).then { () -> Void in
action.fulfill()
self.provider.reportOutgoingCall(with: call.localId, startedConnectingAt: nil)
}.catch { error in
Logger.error("\(self.TAG) error \(error) in \(#function)")
self.callManager.removeCall(call)
action.fail()
}
}
// TODO FIXME
// /*
// Set callback blocks for significant events in the call's lifecycle, so that the CXProvider may be updated
// to reflect the updated state.
// */
// call.hasStartedConnectingDidChange = { [weak self] in
// self?.provider.reportOutgoingCall(with: call.uuid, startedConnectingAt: call.connectingDate)
// }
// call.hasConnectedDidChange = { [weak self] in
// self?.provider.reportOutgoingCall(with: call.uuid, connectedAt: call.connectDate)
// }
}
func provider(_ provider: CXProvider, perform action: CXAnswerCallAction) {

Loading…
Cancel
Save