[V2X]乘客屏不播放语音

[V2X]乘客屏不播放语音
This commit is contained in:
renwj
2022-04-22 17:34:26 +08:00
parent b6ad890fe9
commit 5956825cea
2 changed files with 3 additions and 5 deletions

View File

@@ -453,6 +453,7 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
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<MoGoHmiContract.View?, HmiPresenter?>(),
"$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)

View File

@@ -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<V2XRoadEventEntity> 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));
}
}