From cd593acaa91fcdfa8a86cd77a2bab92ec57d04f8 Mon Sep 17 00:00:00 2001 From: lixiaopeng Date: Fri, 17 Sep 2021 16:28:43 +0800 Subject: [PATCH] opt --- .../module/obu/mogo/MogoPrivateObuManager.kt | 16 +++++++++------- .../service/intent/ADASStatusIntentHandler.java | 7 ++++--- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/modules/mogo-module-obu-mogo/src/main/java/com/mogo/module/obu/mogo/MogoPrivateObuManager.kt b/modules/mogo-module-obu-mogo/src/main/java/com/mogo/module/obu/mogo/MogoPrivateObuManager.kt index bee003e374..a1559a7951 100644 --- a/modules/mogo-module-obu-mogo/src/main/java/com/mogo/module/obu/mogo/MogoPrivateObuManager.kt +++ b/modules/mogo-module-obu-mogo/src/main/java/com/mogo/module/obu/mogo/MogoPrivateObuManager.kt @@ -573,13 +573,15 @@ class MogoPrivateObuManager private constructor() { ) var maxSpeed = currentLight.glosa_suggested_speed_max.toInt() - mIMoGoWaringProvider!!.showWarningV2X( - EventTypeEnum.TYPE_USECASE_ID_IVP_GREEN.poiType.toInt(), - alertContent, - ttsContent,// 只有第一次才tts,防止更新的时候不断的提醒 - appId.toString(), - null - ) + if (maxSpeed > 0) { + mIMoGoWaringProvider!!.showWarningV2X( + EventTypeEnum.TYPE_USECASE_ID_IVP_GREEN.poiType.toInt(), + alertContent, + ttsContent,// 只有第一次才tts,防止更新的时候不断的提醒 + appId.toString(), + null + ) + } } // 黄灯 0x3 -> { diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/intent/ADASStatusIntentHandler.java b/modules/mogo-module-service/src/main/java/com/mogo/module/service/intent/ADASStatusIntentHandler.java index c83e6a4b33..7436f4818c 100644 --- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/intent/ADASStatusIntentHandler.java +++ b/modules/mogo-module-service/src/main/java/com/mogo/module/service/intent/ADASStatusIntentHandler.java @@ -45,11 +45,12 @@ class ADASStatusIntentHandler implements IntentHandler { @Override public void handle( Context context, Intent intent ) { + if ( intent == null ) { + return; + } if ( MogoReceiver.ACTIION_ADAS.equals( intent.getAction() ) ) { - if ( intent == null ) { - return; - } + int status = intent.getIntExtra( MogoReceiver.PARAM_ADAS_STATUS, 0 ); MarkerServiceHandler.getMogoStatusManager().setADASUIShow( ServiceConst.TYPE, status == 1 ); }