diff --git a/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/autopilot/telematic/TeleMsgHandler.kt b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/autopilot/telematic/TeleMsgHandler.kt index 0eca37e334..80aaac3398 100644 --- a/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/autopilot/telematic/TeleMsgHandler.kt +++ b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/autopilot/telematic/TeleMsgHandler.kt @@ -79,6 +79,7 @@ class TeleMsgHandler : IMsgHandler { private var listener: EventListener? = null + @Volatile private var lastTimeOnReceiveDriveVideo = 0L override fun handleMsgFromServer(msg: MogoProtocolMsg?, channel: Channel?) { @@ -201,7 +202,6 @@ class TeleMsgHandler : IMsgHandler { it["open"] = true it["playUrl"] = playUrl }) - CallerTelematicManager.sendMsgToServer(TelematicConstant.DRIVE_SEAT_VIDEO_STREAM_RSP, "11".toByteArray()) } else { MogoAnalyticUtils.track("DriveSeatVideoStream", HashMap().also { it["step"] = 2 @@ -219,6 +219,7 @@ class TeleMsgHandler : IMsgHandler { Log.d(TAG, "--- poller -> $it") if (!it) { // 设备离线了,乘客屏的驾驶位视频控件要移除 + lastTimeOnReceiveDriveVideo = 0L CallerOchBizFunctionCall4EagleManager.setVideoView(null) } CallerTelematicManager.sendMsgToServer(TelematicConstant.DRIVE_SEAT_VIDEO_STREAM_RSP, if (it) "1".toByteArray() else "0".toByteArray()) @@ -226,6 +227,7 @@ class TeleMsgHandler : IMsgHandler { CallerOchBizFunctionCall4EagleManager.setVideoView(target) lastTimeOnReceiveDriveVideo = SystemClock.elapsedRealtime() + CallerTelematicManager.sendMsgToServer(TelematicConstant.DRIVE_SEAT_VIDEO_STREAM_RSP, "11".toByteArray()) } } else { MogoAnalyticUtils.track("DriveSeatVideoStream", HashMap().also { @@ -237,6 +239,7 @@ class TeleMsgHandler : IMsgHandler { } } else { //第1个0代表运营面板开关关闭,第2个1代表关闭成功,告之司机端; 相应的还有状态:00表示关闭失败 + lastTimeOnReceiveDriveVideo = 0L CallerTelematicManager.sendMsgToServer(TelematicConstant.DRIVE_SEAT_VIDEO_STREAM_RSP, "01".toByteArray()) CallerOchBizFunctionCall4EagleManager.setVideoView(null) MogoAnalyticUtils.track("DriveSeatVideoStream", HashMap().also {