增加判断,当外部传入的tts内容为空的时候不进行播放
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package com.mogo.module.hmi.ui
|
||||
|
||||
import android.animation.Animator
|
||||
import android.text.TextUtils
|
||||
import android.view.Gravity
|
||||
import android.view.View
|
||||
import android.view.WindowManager
|
||||
@@ -56,8 +57,10 @@ class MoGoWarningFragment : MvpFragment<MoGoWarningContract.View?, WaringPresent
|
||||
alertContent ?: WarningUtils.getWarningIcon(v2xType)[1] as String
|
||||
)
|
||||
|
||||
AIAssist.getInstance(activity)
|
||||
.speakTTSVoice(ttsContent ?: WarningUtils.getWarningIcon(v2xType)[2] as String)
|
||||
if (!TextUtils.isEmpty(ttsContent)) {
|
||||
AIAssist.getInstance(activity)
|
||||
.speakTTSVoice(ttsContent)
|
||||
}
|
||||
|
||||
WarningFloat.with(it)
|
||||
.setTag(tag)
|
||||
|
||||
Reference in New Issue
Block a user