From baa01b94e46fb9c3f0817b2b28e766b141089c73 Mon Sep 17 00:00:00 2001 From: renwj Date: Tue, 3 Dec 2024 19:49:56 +0800 Subject: [PATCH] =?UTF-8?q?[6.8.0][=E9=A9=BE=E9=A9=B6=E4=BD=8D=E8=A7=86?= =?UTF-8?q?=E9=A2=91=E6=B5=81]=20=E4=B9=98=E5=AE=A2=E7=AB=AF=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E9=80=BB=E8=BE=91=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../datacenter/autopilot/telematic/TeleMsgHandler.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 {