Don't stop audio until after CallKit audio session is deactivated
// FREEBIE
This commit is contained in:
parent
9b73ff14ba
commit
6eb1951ee6
@ -25,6 +25,7 @@ final class CallKitCallUIAdaptee: NSObject, CallUIAdaptee, CXProviderDelegate {
|
||||
internal let notificationsAdapter: CallNotificationsAdapter
|
||||
internal let contactsManager: OWSContactsManager
|
||||
private let provider: CXProvider
|
||||
let audioActivity: AudioActivity
|
||||
|
||||
// CallKit handles incoming ringer stop/start for us. Yay!
|
||||
let hasManualRinger = false
|
||||
@ -60,6 +61,7 @@ final class CallKitCallUIAdaptee: NSObject, CallUIAdaptee, CXProviderDelegate {
|
||||
self.contactsManager = contactsManager
|
||||
self.notificationsAdapter = notificationsAdapter
|
||||
self.provider = CXProvider(configuration: type(of: self).providerConfiguration)
|
||||
self.audioActivity = AudioActivity(audioDescription: "[CallKitCallUIAdaptee]")
|
||||
|
||||
super.init()
|
||||
|
||||
@ -348,6 +350,7 @@ final class CallKitCallUIAdaptee: NSObject, CallUIAdaptee, CXProviderDelegate {
|
||||
|
||||
Logger.debug("\(TAG) Received \(#function)")
|
||||
|
||||
OWSAudioSession.shared.startAudioActivity(self.audioActivity)
|
||||
OWSAudioSession.shared.isRTCAudioEnabled = true
|
||||
}
|
||||
|
||||
@ -356,6 +359,7 @@ final class CallKitCallUIAdaptee: NSObject, CallUIAdaptee, CXProviderDelegate {
|
||||
|
||||
Logger.debug("\(TAG) Received \(#function)")
|
||||
OWSAudioSession.shared.isRTCAudioEnabled = false
|
||||
OWSAudioSession.shared.endAudioActivity(self.audioActivity)
|
||||
}
|
||||
|
||||
// MARK: - Util
|
||||
|
||||
Loading…
Reference in New Issue
Block a user