chenqiyang
2021-08-24 8227d1cefb20e357250a4a7fe8da32141b6cfc1e
HDLLinPhoneSDK/HDLLinPhoneSDK/HDLCallManager.swift
@@ -176,9 +176,9 @@
        providerDelegate.callInfos.updateValue(callInfo, forKey: uuid)
        providerDelegate.uuids.updateValue(uuid, forKey: callId)
        let state: UIApplication.State = UIApplication.shared.applicationState
        if state == .background{
            providerDelegate.reportIncomingCall(call:call, uuid: uuid, handle: handle, hasVideo: hasVideo)
        }
//        if state == .background{
//            providerDelegate.reportIncomingCall(call:call, uuid: uuid, handle: handle, hasVideo: hasVideo)
//        }
//        providerDelegate.reportIncomingCall(call:call, uuid: uuid, handle: handle, hasVideo: hasVideo)
    }
    
@@ -202,6 +202,7 @@
        }
        let call = Call.getSwiftObject(cObject: call!)
        acceptCall(call: call, hasVideo: hasVideo)
//        HDLCallManager.instance().lc?.activateAudioSession(actived: true)
    }
    
    
@@ -337,7 +338,7 @@
    }
    // To be removed.
    static func configAudioSession(audioSession: AVAudioSession) {
    @objc static func configAudioSession(audioSession: AVAudioSession) {
        do {
            try audioSession.setCategory(AVAudioSession.Category.playAndRecord, mode: AVAudioSession.Mode.voiceChat, options: AVAudioSession.CategoryOptions(rawValue: AVAudioSession.CategoryOptions.allowBluetooth.rawValue | AVAudioSession.CategoryOptions.allowBluetoothA2DP.rawValue))
            try audioSession.setMode(AVAudioSession.Mode.voiceChat)