From e8c5509f3a609b37dc7c10eb2148797ca2731084 Mon Sep 17 00:00:00 2001 From: Michael Kirk Date: Thu, 22 Feb 2018 18:18:57 -0500 Subject: [PATCH] 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 --- Signal/src/call/Speakerbox/CallKitCallUIAdaptee.swift | 8 -------- 1 file changed, 8 deletions(-) diff --git a/Signal/src/call/Speakerbox/CallKitCallUIAdaptee.swift b/Signal/src/call/Speakerbox/CallKitCallUIAdaptee.swift index 7066e091d..670f51b42 100644 --- a/Signal/src/call/Speakerbox/CallKitCallUIAdaptee.swift +++ b/Signal/src/call/Speakerbox/CallKitCallUIAdaptee.swift @@ -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 /*