Respond to CR.

// FREEBIE
This commit is contained in:
Matthew Chen 2017-02-23 07:18:37 -08:00
parent 01d2582074
commit c35c118dcd
3 changed files with 9 additions and 13 deletions

View File

@ -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'

View File

@ -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

View File

@ -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) {