[2.13.0_feat]消息盒子数据中心管理各类消息
This commit is contained in:
@@ -9,6 +9,9 @@ import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.BIZ_SLW
|
||||
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.V2I
|
||||
import com.mogo.eagle.core.data.enums.WarningDirectionEnum
|
||||
import com.mogo.eagle.core.data.map.Infrastructure
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxType
|
||||
import com.mogo.eagle.core.data.msgbox.V2XMsg
|
||||
import com.mogo.eagle.core.data.notice.NoticeNormalData
|
||||
import com.mogo.eagle.core.data.notice.NoticeTrafficStylePushData
|
||||
import com.mogo.eagle.core.data.report.ReportEntity
|
||||
@@ -19,6 +22,8 @@ import com.mogo.eagle.core.function.api.hmi.view.IViewTrafficLight
|
||||
import com.mogo.eagle.core.function.api.hmi.warning.IMoGoWaringProvider
|
||||
import com.mogo.eagle.core.function.api.hmi.warning.IMoGoWarningStatusListener
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager.saveMsgBox
|
||||
import com.zhjt.service_biz.BizConfig
|
||||
|
||||
/**
|
||||
@@ -145,6 +150,31 @@ object CallerHmiManager : CallerBase() {
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* 不展示顶部弹窗,其它保留
|
||||
*/
|
||||
fun warningV2X(
|
||||
v2xType: String,
|
||||
alertContent: CharSequence?,
|
||||
ttsContent: String?,
|
||||
tag: String?,
|
||||
listenerIMoGo: IMoGoWarningStatusListener?,
|
||||
playTts: Boolean,
|
||||
expireTime: Long = 5000L,
|
||||
msgBoxType: MsgBoxType
|
||||
) {
|
||||
saveMsgBox(MsgBoxBean(msgBoxType, V2XMsg(v2xType, alertContent?.toString() ?: "", ttsContent)))
|
||||
waringProviderApi?.warningV2X(
|
||||
v2xType,
|
||||
alertContent,
|
||||
ttsContent,
|
||||
tag,
|
||||
listenerIMoGo,
|
||||
playTts,
|
||||
expireTime
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* 关闭指定floatTag 的 VR下V2X预警弹窗
|
||||
* @param tag 弹窗标识
|
||||
@@ -271,6 +301,7 @@ object CallerHmiManager : CallerBase() {
|
||||
*
|
||||
*/
|
||||
fun showNoticeNormalData(noticeNormal: NoticeNormalData) {
|
||||
saveMsgBox(MsgBoxBean(MsgBoxType.NOTICE, noticeNormal))
|
||||
waringProviderApi?.showNoticeNormalData(noticeNormal)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.mogo.eagle.core.function.call.msgbox
|
||||
|
||||
import android.content.Context
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
|
||||
import com.mogo.eagle.core.function.api.msgbox.IMsgBoxProvider
|
||||
@@ -25,21 +26,40 @@ object CallerMsgBoxManager {
|
||||
/**
|
||||
* 通知消息:V2X、云公告、运营信息
|
||||
*/
|
||||
fun getNotifyData(): List<MsgBoxBean>? {
|
||||
return providerApi?.getNotifyData()
|
||||
fun getCachedNotifyData(): List<MsgBoxBean>? {
|
||||
return providerApi?.getCachedNotifyData()
|
||||
}
|
||||
|
||||
/**
|
||||
* 工控机Report信息
|
||||
*/
|
||||
fun getSysInfoData(): List<MsgBoxBean>? {
|
||||
return providerApi?.getSysInfoData()
|
||||
fun getCachedSysInfoData(): List<MsgBoxBean>? {
|
||||
return providerApi?.getCachedSysInfoData()
|
||||
}
|
||||
|
||||
/**
|
||||
* 录包信息
|
||||
*/
|
||||
fun getRecordBagData(): List<MsgBoxBean>? {
|
||||
return providerApi?.getRecordBagData()
|
||||
fun getCachedRecordBagData(): List<MsgBoxBean>? {
|
||||
return providerApi?.getCachedRecordBagData()
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户已处理的Bag包需要删除
|
||||
* key: Bag包的唯一标识key,value:任意非空的值
|
||||
*/
|
||||
fun removeRecordInfo(key: String, value: Any) {
|
||||
providerApi?.removeRecordInfo(key, value)
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除消息盒子中存入数据库的数据,比如已经处理的录制bag信息
|
||||
*/
|
||||
fun deleteBoxBean(context: Context, msgBoxBean: MsgBoxBean) {
|
||||
providerApi?.deleteBoxBean(context, msgBoxBean)
|
||||
}
|
||||
|
||||
fun getDismissTime(): Long {
|
||||
return providerApi?.getDismissTime() ?: 0L
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user