diff --git a/Podfile b/Podfile index 8fd239f14..cd48430fb 100644 --- a/Podfile +++ b/Podfile @@ -6,6 +6,7 @@ target 'Signal' do pod 'AxolotlKit', git: 'https://github.com/WhisperSystems/SignalProtocolKit.git' #pod 'AxolotlKit', path: '../SignalProtocolKit' pod 'SignalServiceKit', git: 'https://github.com/WhisperSystems/SignalServiceKit.git' + #pod 'SignalServiceKit', git: 'https://github.com/WhisperSystems/SignalServiceKit.git', :branch => 'charlesmchen/callkitPrivacy' #pod 'SignalServiceKit', path: '../SignalServiceKit' pod 'OpenSSL' pod 'PastelogKit', '~> 1.3' diff --git a/Podfile.lock b/Podfile.lock index 521eaad7a..b2d2b9efd 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -140,7 +140,7 @@ CHECKOUT OPTIONS: :commit: a3c843cc8a423c5924c663490978f81dba34d04e :git: https://github.com/WhisperSystems/SignalProtocolKit.git SignalServiceKit: - :commit: 0393e4f0b4eea97ffcc8343558947363d303a904 + :commit: '0393e4f0b4eea97ffcc8343558947363d303a904' :git: https://github.com/WhisperSystems/SignalServiceKit.git SocketRocket: :commit: 877ac7438be3ad0b45ef5ca3969574e4b97112bf @@ -172,6 +172,6 @@ SPEC CHECKSUMS: YapDatabase: b1e43555a34a5298e23a045be96817a5ef0da58f ZXingObjC: bbf7b8f0cf8933fdd33eb4f9f46e22308552869b -PODFILE CHECKSUM: 48dbf2fb380d626bb799a782dd41b6bf1e466506 +PODFILE CHECKSUM: e42108cf3f6af782b766b179d69dbc8e6daf070d COCOAPODS: 1.1.1 diff --git a/Signal/src/call/Speakerbox/CallKitCallUIAdaptee.swift b/Signal/src/call/Speakerbox/CallKitCallUIAdaptee.swift index 03c74a8ff..3070bcda7 100644 --- a/Signal/src/call/Speakerbox/CallKitCallUIAdaptee.swift +++ b/Signal/src/call/Speakerbox/CallKitCallUIAdaptee.swift @@ -243,18 +243,13 @@ final class CallKitCallUIAdaptee: NSObject, CallUIAdaptee, CXProviderDelegate { action.fulfill() self.provider.reportOutgoingCall(with: call.localId, startedConnectingAt: nil) - ensureCallName(call:call) - } - - func ensureCallName(call: SignalCall) { - guard Environment.getCurrent().preferences.isCallKitPrivacyEnabled() else { - return + if Environment.getCurrent().preferences.isCallKitPrivacyEnabled() { + // Update the name used in the CallKit UI for outgoing calls. + let update = CXCallUpdate() + update.localizedCallerName = NSLocalizedString("CALLKIT_ANONYMOUS_CONTACT_NAME", + comment: "The generic name used for calls if CallKit privacy is enabled") + provider.reportCall(with: call.localId, updated: update) } - - // Update the name used in the CallKit UI for outgoing calls. - let update = CXCallUpdate() - update.localizedCallerName = NSLocalizedString("CALLKIT_ANONYMOUS_CONTACT_NAME", comment: "The generic name used for calls if CallKit privacy is enabled") - provider.reportCall(with: call.localId, updated: update) } func provider(_ provider: CXProvider, perform action: CXAnswerCallAction) {