|
@@ -11,6 +11,7 @@ import com.google.gson.Gson
|
|
|
import com.wdkl.app.ncs.callingbed.R
|
|
|
import com.wdkl.app.ncs.callingbed.helper.RingPlayHelper
|
|
|
import com.wdkl.app.ncs.callingbed.helper.SerialPortHelper
|
|
|
+import com.wdkl.app.ncs.callingbed.helper.Utils
|
|
|
import com.wdkl.app.ncs.callingbed.helper.VoiceManagerUtil
|
|
|
import com.wdkl.app.ncs.callingbed.settings.SettingConfig
|
|
|
import com.wdkl.ncs.android.lib.base.BaseApplication
|
|
@@ -123,6 +124,7 @@ class SkyCallFragment: BaseCallFragment(), CallSessionCallback {
|
|
|
//自动接听
|
|
|
handler.postDelayed({
|
|
|
if (!callEnded && Constant.CALL_STATE != Constant.CALL_CALLING) {
|
|
|
+ Utils.setMainMic(activity,false)
|
|
|
RingPlayHelper.stopRingTone()
|
|
|
VoiceUtil.acceptAudioCall(Constant.DEVICE_ID, fromId, interactionVO?.id)
|
|
|
acceptCall()
|
|
@@ -150,6 +152,7 @@ class SkyCallFragment: BaseCallFragment(), CallSessionCallback {
|
|
|
janusClient!!.setJanusCallback(videoRoomCallback)
|
|
|
|
|
|
if (visiting) {
|
|
|
+ Utils.setMainMic(activity,false)
|
|
|
janusClient!!.connect(-1, false)
|
|
|
}
|
|
|
|
|
@@ -182,6 +185,7 @@ class SkyCallFragment: BaseCallFragment(), CallSessionCallback {
|
|
|
|
|
|
//来电接听
|
|
|
sky_voice_call_ring_pickup_audio.setOnClickListener {
|
|
|
+ Utils.setMainMic(activity,false)
|
|
|
RingPlayHelper.stopRingTone()
|
|
|
Constant.CALL_STATE = Constant.CALL_INCOMING
|
|
|
VoiceUtil.acceptAudioCall(Constant.DEVICE_ID, fromId, interactionVO?.id)
|
|
@@ -556,6 +560,7 @@ class SkyCallFragment: BaseCallFragment(), CallSessionCallback {
|
|
|
} else if (curTcpModel.getAction() == TcpAction.VoiceAction.SUCCESS) {
|
|
|
//呼叫成功
|
|
|
//本机呼叫的时候tcpModel为空,只有呼叫成功的时候才能获得对应tcp相关数据
|
|
|
+ Utils.setMainMic(activity,false)
|
|
|
callSuccess = true
|
|
|
sky_voice_call_hangup.isEnabled = true
|
|
|
interactionVO = curInteractionVO
|
|
@@ -606,6 +611,7 @@ class SkyCallFragment: BaseCallFragment(), CallSessionCallback {
|
|
|
VoiceUtil.cancelAudioCall(Constant.DEVICE_ID)
|
|
|
cancelCall()
|
|
|
} else if (serialAction.equals("accept")) {
|
|
|
+ Utils.setMainMic(activity,false)
|
|
|
RingPlayHelper.stopRingTone()
|
|
|
//Constant.CALL_STATE = Constant.CALL_CALLING
|
|
|
VoiceUtil.acceptAudioCall(Constant.DEVICE_ID, fromId, interactionVO?.id)
|