From 5956825cea05e97aac500a4d065046b7f4fe8bb3 Mon Sep 17 00:00:00 2001 From: renwj Date: Fri, 22 Apr 2022 17:34:26 +0800 Subject: [PATCH] =?UTF-8?q?[V2X]=E4=B9=98=E5=AE=A2=E5=B1=8F=E4=B8=8D?= =?UTF-8?q?=E6=92=AD=E6=94=BE=E8=AF=AD=E9=9F=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [V2X]乘客屏不播放语音 --- .../com/mogo/eagle/core/function/hmi/ui/MoGoHmiFragment.kt | 3 ++- .../v2x/events/scenario/scene/road/V2XRoadEventScenario.java | 5 +---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/MoGoHmiFragment.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/MoGoHmiFragment.kt index ee7d9ab73f..62fe6d6e0d 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/MoGoHmiFragment.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/MoGoHmiFragment.kt @@ -453,6 +453,7 @@ class MoGoHmiFragment : MvpFragment(), playTts: Boolean, expireTime: Long ) { + val playTTS = playTts && !AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode) lifecycleScope.launchWhenResumed { activity?.let { val floatWindow = mWarningFloat @@ -489,7 +490,7 @@ class MoGoHmiFragment : MvpFragment(), "$M_HMI$TAG", "mWarningFloat = $mWarningFloat---ttsContent = $ttsContent" ) - if (mWarningFloat != null && !TextUtils.isEmpty(ttsContent) && playTts) { + if (mWarningFloat != null && !TextUtils.isEmpty(ttsContent) && playTTS) { CallerLogger.d("$M_HMI$TAG", "---> ttsContent = $ttsContent") AIAssist.getInstance(activity) .speakTTSVoice(ttsContent) diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/road/V2XRoadEventScenario.java b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/road/V2XRoadEventScenario.java index f6569ed240..72dbae0235 100644 --- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/road/V2XRoadEventScenario.java +++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/events/scenario/scene/road/V2XRoadEventScenario.java @@ -2,12 +2,10 @@ package com.mogo.eagle.core.function.v2x.events.scenario.scene.road; import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_V2X; -import com.mogo.eagle.core.data.config.FunctionBuildConfig; import com.mogo.eagle.core.data.enums.WarningDirectionEnum; import com.mogo.eagle.core.function.api.hmi.warning.IMoGoWarningStatusListener; import com.mogo.eagle.core.function.call.hmi.CallerHmiManager; import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager; -import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils; import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger; import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi; import com.mogo.eagle.core.function.v2x.events.consts.V2XConst; @@ -100,8 +98,7 @@ public class V2XRoadEventScenario extends AbsV2XScenario imp V2XRoadEventEntity content = entity != null ? entity.getContent() : null; if (content != null) { //显示警告红边 - boolean playTts = !entity.isOnlyShow() && !AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode); - CallerHmiManager.INSTANCE.showWarningV2X(entity.getType(), content.getAlarmContent(), content.getTts(), TAG, this, playTts, TimeUnit.SECONDS.toMillis(5)); + CallerHmiManager.INSTANCE.showWarningV2X(entity.getType(), content.getAlarmContent(), content.getTts(), TAG, this, !entity.isOnlyShow(), TimeUnit.SECONDS.toMillis(5)); } }