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 1cab2080b0..e3e8114e85 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 @@ -14,7 +14,6 @@ import com.mogo.commons.mvp.MvpFragment import com.mogo.commons.voice.AIAssist import com.mogo.eagle.core.data.autopilot.AdUpgradeStateHelper import com.mogo.eagle.core.data.camera.CameraEntity -import com.mogo.eagle.core.data.config.FunctionBuildConfig import com.mogo.eagle.core.data.config.HmiBuildConfig import com.mogo.eagle.core.data.constants.MoGoFragmentPaths import com.mogo.eagle.core.data.enums.SidePattern @@ -45,12 +44,10 @@ import com.mogo.eagle.core.function.hmi.ui.notice.NoticeNormalBannerView import com.mogo.eagle.core.function.hmi.ui.setting.DebugSettingView import com.mogo.eagle.core.function.hmi.ui.tools.AutoPilotAndCheckView import com.mogo.eagle.core.function.hmi.ui.widget.V2XNotificationView -import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_HMI import com.mogo.eagle.core.utilcode.util.ThreadUtils import com.mogo.eagle.core.utilcode.util.ToastUtils -import com.mogo.module.common.entity.V2XMessageEntity import com.mogo.module.common.enums.EventTypeEnum import kotlinx.android.synthetic.main.fragment_hmi.* import kotlinx.coroutines.* @@ -480,16 +477,8 @@ class MoGoHmiFragment : MvpFragment(), ) if (mWarningFloat != null && !TextUtils.isEmpty(ttsContent) && playTts) { CallerLogger.d("$M_HMI$TAG", "---> ttsContent = $ttsContent") - - var playTTS = true - if (V2XMessageEntity.V2XTypeEnum.ALERT_ROAD_WARNING == v2xType && AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)) { - //乘客屏,道路事件不播放语音 - playTTS = false - } - if (playTTS) { - AIAssist.getInstance(activity) - .speakTTSVoice(ttsContent) - } + AIAssist.getInstance(activity) + .speakTTSVoice(ttsContent) } showWarning(WarningDirectionEnum.ALERT_WARNING_ALL) } 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 72dbae0235..f6569ed240 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,10 +2,12 @@ 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; @@ -98,7 +100,8 @@ public class V2XRoadEventScenario extends AbsV2XScenario imp V2XRoadEventEntity content = entity != null ? entity.getContent() : null; if (content != null) { //显示警告红边 - CallerHmiManager.INSTANCE.showWarningV2X(entity.getType(), content.getAlarmContent(), content.getTts(), TAG, this, !entity.isOnlyShow(), TimeUnit.SECONDS.toMillis(5)); + boolean playTts = !entity.isOnlyShow() && !AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode); + CallerHmiManager.INSTANCE.showWarningV2X(entity.getType(), content.getAlarmContent(), content.getTts(), TAG, this, playTts, TimeUnit.SECONDS.toMillis(5)); } }