[650]feat: 路侧事件弹框,增加caller 调用方式;
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
package com.mogo.eagle.core.function.call.hmi
|
||||
|
||||
import com.mogo.eagle.core.data.road.RoadV2NEventWindowBean
|
||||
import com.mogo.eagle.core.function.api.hmi.v2n.IRoadV2NEventWindowListener
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
import java.util.UUID
|
||||
|
||||
/**
|
||||
* 路侧V2N事件弹框 调用者管理类
|
||||
*/
|
||||
object CallerRoadV2NEventWindowListenerManager : CallerBase<IRoadV2NEventWindowListener>() {
|
||||
|
||||
fun show(
|
||||
timestamp: Long,
|
||||
iconResId: Int,
|
||||
hintStr: String,
|
||||
isNeedTTS: Boolean,
|
||||
cameraIp: String
|
||||
): String {
|
||||
val uuid = UUID.randomUUID().toString()
|
||||
val data = RoadV2NEventWindowBean(uuid, timestamp, iconResId, hintStr, isNeedTTS, cameraIp)
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
listener.show(data)
|
||||
}
|
||||
return uuid
|
||||
}
|
||||
|
||||
fun dismiss(uuid: String) {
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
listener.dismiss(
|
||||
uuid
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user