|
@@ -1062,18 +1062,20 @@ class MainActivity :BaseActivity<MainActivityPresenter, MainActivityLayoutBindin
|
|
|
}
|
|
|
} else if (tcpModel.getAction() == TcpAction.VoiceAction.HANDOFF) {
|
|
|
//对方挂断,不论我方呼出或呼入
|
|
|
- //val interactionVO = Gson().fromJson(tcpModel.data.toString(), InteractionVO::class.java)
|
|
|
+ val interactionVO = Gson().fromJson(tcpModel.data.toString(), InteractionVO::class.java)
|
|
|
//if (curInteractionVO!!.id == interactionVO.id) {
|
|
|
//callTimer.cancel()
|
|
|
Constant.CALL_STATE = Constant.CALL_STANDBY
|
|
|
updateCallText("待机中")
|
|
|
showMessage("对方挂断")
|
|
|
//关闭分机呼叫和门灯
|
|
|
- SerialPortHelper.closeSoundChannel(curDeviceUart)
|
|
|
- /*val doorAddr = getDoorLightAddr(interactionVO.fromEthMac)
|
|
|
- if (!TextUtils.isEmpty(doorAddr)) {
|
|
|
- SerialPortHelper.closeDoorLight(doorAddr)
|
|
|
- }*/
|
|
|
+ if (interactionVO.fromDeviceType == DeviceTypeEnum.SIMULATE_BED_DEVICE.value()) {
|
|
|
+ SerialPortHelper.closeSoundChannel(interactionVO.fromEthMac.toUpperCase(Locale.ROOT))
|
|
|
+ /*val doorAddr = getDoorLightAddr(interactionVO.fromEthMac)
|
|
|
+ if (!TextUtils.isEmpty(doorAddr)) {
|
|
|
+ SerialPortHelper.closeDoorLight(doorAddr)
|
|
|
+ }*/
|
|
|
+ }
|
|
|
//}
|
|
|
} else if (tcpModel.getAction() == TcpAction.VoiceAction.CANCEL) {
|
|
|
//对方呼叫时取消
|