Respect system contact ringtones

If CallKit privacy is enabled, we'll always use the system default
ringer.

If CallKit privacy is *not* enabled we'll use any ringtone specified in
the for that contact in the address book, else fall back to the default

// FREEBIE
pull/1/head
Michael Kirk 8 years ago
parent f7935bc363
commit e8c5509f3a

@ -46,8 +46,6 @@ final class CallKitCallUIAdaptee: NSObject, CallUIAdaptee, CXProviderDelegate {
let iconMaskImage = #imageLiteral(resourceName: "logoSignal")
providerConfiguration.iconTemplateImageData = UIImagePNGRepresentation(iconMaskImage)
// We set the ringtoneSound property later.
return providerConfiguration
}
@ -124,12 +122,6 @@ final class CallKitCallUIAdaptee: NSObject, CallUIAdaptee, CXProviderDelegate {
disableUnsupportedFeatures(callUpdate: update)
// Update the provider configuration to reflect the caller's ringtone.
let sound = OWSSounds.ringtoneSound(for: call.thread)
let providerConfiguration = provider.configuration
providerConfiguration.ringtoneSound = OWSSounds.filename(for: sound)
provider.configuration = providerConfiguration
// Report the incoming call to the system
provider.reportNewIncomingCall(with: call.localId, update: update) { error in
/*

Loading…
Cancel
Save