|
@@ -891,16 +891,20 @@ class NurseHomeActivity : BaseActivity<NurseHomeActivityPresenter, ActivityNurs
|
|
|
}
|
|
|
|
|
|
} else if (tcpModel.getAction() == TcpAction.VoiceAction.REJECT) {//对方拒绝
|
|
|
- Constants.CALL_STATE = Constants.CALL_STANDBY
|
|
|
- DeviceChannel.calling = false
|
|
|
- CallDialogHelper.dismissCallDialog()
|
|
|
- countDownTimer.cancel()
|
|
|
+ if (Constants.interactionId == interactionVO.id) {
|
|
|
+ Constants.CALL_STATE = Constants.CALL_STANDBY
|
|
|
+ DeviceChannel.calling = false
|
|
|
+ CallDialogHelper.dismissCallDialog()
|
|
|
+ countDownTimer.cancel()
|
|
|
+ }
|
|
|
} else if (tcpModel.getAction() == TcpAction.VoiceAction.CANCEL) {//对方取消
|
|
|
- Constants.CALL_STATE = Constants.CALL_STANDBY
|
|
|
- DeviceChannel.calling = false
|
|
|
- CallDialogHelper.dismissCallDialog()
|
|
|
- countDownTimer.cancel()
|
|
|
- transferCountDownTimer.cancel()
|
|
|
+ if (Constants.interactionId == interactionVO.id) {
|
|
|
+ Constants.CALL_STATE = Constants.CALL_STANDBY
|
|
|
+ DeviceChannel.calling = false
|
|
|
+ CallDialogHelper.dismissCallDialog()
|
|
|
+ countDownTimer.cancel()
|
|
|
+ transferCountDownTimer.cancel()
|
|
|
+ }
|
|
|
} else if (tcpModel.getAction() == TcpAction.VoiceAction.CALLING) {//对方通话中
|
|
|
showMessage("对方忙线中")
|
|
|
Constants.CALL_STATE = Constants.CALL_STANDBY
|
|
@@ -914,11 +918,13 @@ class NurseHomeActivity : BaseActivity<NurseHomeActivityPresenter, ActivityNurs
|
|
|
CallDialogHelper.dismissCallDialog()
|
|
|
countDownTimer.cancel()
|
|
|
} else if (tcpModel.getAction() == TcpAction.VoiceAction.HANDOFF) {//对方挂断
|
|
|
- Constants.CALL_STATE = Constants.CALL_STANDBY
|
|
|
- DeviceChannel.calling = false
|
|
|
- CallDialogHelper.dismissCallDialog()
|
|
|
- countDownTimer.cancel()
|
|
|
- transferCountDownTimer.cancel()
|
|
|
+ if (Constants.interactionId == interactionVO.id) {
|
|
|
+ Constants.CALL_STATE = Constants.CALL_STANDBY
|
|
|
+ DeviceChannel.calling = false
|
|
|
+ CallDialogHelper.dismissCallDialog()
|
|
|
+ countDownTimer.cancel()
|
|
|
+ transferCountDownTimer.cancel()
|
|
|
+ }
|
|
|
} else if (tcpModel.getAction() == TcpAction.VoiceAction.SUCCESS) {//服务器返回的呼叫成功tcp
|
|
|
Constants.interactionId = interactionVO.id
|
|
|
callTargetId = interactionVO.toDeviceId
|
|
@@ -1010,13 +1016,17 @@ class NurseHomeActivity : BaseActivity<NurseHomeActivityPresenter, ActivityNurs
|
|
|
SpeechUtil.getInstance().addSpeech("您有新的探视请求", false)
|
|
|
}
|
|
|
} else if (tcpModel.action == TcpAction.VideoAction.CANCEL) {
|
|
|
- Constants.CALL_STATE = Constants.CALL_STANDBY
|
|
|
- DeviceChannel.calling = false
|
|
|
- CallDialogHelper.dismissCallDialog()
|
|
|
+ if (Constants.interactionId == interactionVO.id) {
|
|
|
+ Constants.CALL_STATE = Constants.CALL_STANDBY
|
|
|
+ DeviceChannel.calling = false
|
|
|
+ CallDialogHelper.dismissCallDialog()
|
|
|
+ }
|
|
|
} else if (tcpModel.action == TcpAction.VideoAction.HANDOFF) {
|
|
|
- Constants.CALL_STATE = Constants.CALL_STANDBY
|
|
|
- DeviceChannel.calling = false
|
|
|
- VisitingWindow.release()
|
|
|
+ if (Constants.interactionId == interactionVO.id) {
|
|
|
+ Constants.CALL_STATE = Constants.CALL_STANDBY
|
|
|
+ DeviceChannel.calling = false
|
|
|
+ VisitingWindow.release()
|
|
|
+ }
|
|
|
} else if (tcpModel.action == TcpAction.VideoAction.SUCCESS) {
|
|
|
//显示探视窗口
|
|
|
Constants.CALL_STATE = Constants.CALL_VISITING
|