Disable unused CallKit buttons.

// FREEBIE
pull/1/head
Matthew Chen 9 years ago
parent 8639471494
commit d4dbe7f44f

@ -30,6 +30,8 @@ final class CallKitCallUIAdaptee: NSObject, CallUIAdaptee, CXProviderDelegate {
providerConfiguration.supportsVideo = true providerConfiguration.supportsVideo = true
providerConfiguration.maximumCallGroups = 1
providerConfiguration.maximumCallsPerCallGroup = 1 providerConfiguration.maximumCallsPerCallGroup = 1
providerConfiguration.supportedHandleTypes = [.phoneNumber] providerConfiguration.supportedHandleTypes = [.phoneNumber]
@ -68,7 +70,11 @@ final class CallKitCallUIAdaptee: NSObject, CallUIAdaptee, CXProviderDelegate {
let update = CXCallUpdate() let update = CXCallUpdate()
update.remoteHandle = CXHandle(type: .phoneNumber, value: call.remotePhoneNumber) update.remoteHandle = CXHandle(type: .phoneNumber, value: call.remotePhoneNumber)
update.hasVideo = call.hasVideo update.hasVideo = call.hasVideo
update.supportsHolding = false
update.supportsGrouping = false
update.supportsUngrouping = false
update.supportsDTMF = false
// Report the incoming call to the system // Report the incoming call to the system
provider.reportNewIncomingCall(with: call.localId, update: update) { error in provider.reportNewIncomingCall(with: call.localId, update: update) { error in
/* /*

@ -647,8 +647,8 @@ class CallViewController: UIViewController, CallDelegate {
internal func stateDidChange(call: SignalCall, state: CallState) { internal func stateDidChange(call: SignalCall, state: CallState) {
DispatchQueue.main.async { DispatchQueue.main.async {
Logger.info("\(self.TAG) new call status: \(state)")
self.updateCallUI(callState: state) self.updateCallUI(callState: state)
Logger.info("\(self.TAG) new call status: \(call.state)")
} }
self.audioService.handleState(state) self.audioService.handleState(state)
} }

Loading…
Cancel
Save