[6.2.6]平行驾驶的异常提醒均在开启美化模式后不弹出、不语音提示

This commit is contained in:
xuxinchao
2023-12-18 15:18:22 +08:00
parent 0153bf59ba
commit dec66f0eee

View File

@@ -240,54 +240,60 @@ class TakeOverView @JvmOverloads constructor(
}
/**
* M1平行驾驶异常提示
* M1、C1平行驾驶异常提示
*/
private fun showM1ParallelDrivingWarning(poiType: String,content: String,tts: String){
//消息盒子提示
saveMsgBox(
MsgBoxBean(
MsgBoxType.V2X, V2XMsg(poiType, content, tts)
//异常提醒均在开启美化模式后不弹出、不语音提示
if(!FunctionBuildConfig.isDemoMode){
//消息盒子提示
saveMsgBox(
MsgBoxBean(
MsgBoxType.V2X, V2XMsg(poiType, content, tts)
)
)
)
//提示音播报
if(canSound){
val countDownTimer = object : CountDownTimer(3000, 1000){
override fun onTick(p0: Long) {
try {
SoundPoolUtils.getSoundPool().playSoundWithRedId(context,R.raw.weak_net_tips)
}catch (e: Exception){
e.printStackTrace()
//提示音播报
if(canSound){
val countDownTimer = object : CountDownTimer(3000, 1000){
override fun onTick(p0: Long) {
try {
SoundPoolUtils.getSoundPool().playSoundWithRedId(context,R.raw.weak_net_tips)
}catch (e: Exception){
e.printStackTrace()
}
}
}
override fun onFinish() {
canSound = true
}
override fun onFinish() {
canSound = true
}
}
countDownTimer.start()
canSound = false
}
countDownTimer.start()
canSound = false
}
}
private fun showParallelDrivingWarning(poiType: String,content: String,tts: String){
CallerHmiManager.warningV2X(poiType, content, tts,
object : IMoGoWarningStatusListener {
override fun onShow() {
takeOver = true
ThreadUtils.runOnUiThread{
visibility = View.VISIBLE
if(!FunctionBuildConfig.isDemoMode){
//异常提醒均在开启美化模式后不弹出、不语音提示
CallerHmiManager.warningV2X(poiType, content, tts,
object : IMoGoWarningStatusListener {
override fun onShow() {
takeOver = true
ThreadUtils.runOnUiThread{
visibility = View.VISIBLE
}
}
}
override fun onDismiss() {
takeOver = false
ThreadUtils.runOnUiThread{
visibility = View.GONE
override fun onDismiss() {
takeOver = false
ThreadUtils.runOnUiThread{
visibility = View.GONE
}
}
}
}
,isFromObu = false)
,isFromObu = false)
}
}
}