|
@@ -61,6 +61,7 @@ class WebRTCVoipAudioActivity : Activity(), View.OnClickListener, CallSessionCal
|
|
|
lateinit var countDownTimer: CountDownTimer
|
|
|
private var isClick = true //是否可点击
|
|
|
private var createEnabled = true
|
|
|
+ private var selftHandOff = false
|
|
|
|
|
|
override fun onCreate(savedInstanceState: Bundle?) {
|
|
|
super.onCreate(savedInstanceState)
|
|
@@ -166,7 +167,7 @@ class WebRTCVoipAudioActivity : Activity(), View.OnClickListener, CallSessionCal
|
|
|
//6秒后仍然未连接,则断开
|
|
|
Handler().postDelayed({
|
|
|
Log.i(TAG,"session state:"+gEngineKit?.currentSession?.state+",userState:"+ SocketManager.getInstance().userState)
|
|
|
- if (gEngineKit?.currentSession?.state != EnumType.CallState.Connected){
|
|
|
+ if (gEngineKit?.currentSession?.state != EnumType.CallState.Connected && !selftHandOff){
|
|
|
showMessage("连接失败,请重试")
|
|
|
|
|
|
gEngineKit?.endCall()
|
|
@@ -262,6 +263,7 @@ class WebRTCVoipAudioActivity : Activity(), View.OnClickListener, CallSessionCal
|
|
|
TcpClient.getInstance().sendMsg(voiceUtilTcpModel.toJson())
|
|
|
}
|
|
|
}
|
|
|
+ selftHandOff = true
|
|
|
gEngineKit?.endCall()
|
|
|
finish()
|
|
|
}
|