[add] 1.添加push推送数据体bean 2.添加caller调hmi UI调起流程相关java类文件
This commit is contained in:
@@ -2,8 +2,10 @@ package com.mogo.eagle.core.function.call.hmi
|
||||
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths
|
||||
import com.mogo.eagle.core.data.enums.WarningDirectionEnum
|
||||
import com.mogo.eagle.core.data.notice.NoticePushData
|
||||
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.api.notice.IMoGoNoticeProvider
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
|
||||
/**
|
||||
@@ -16,6 +18,8 @@ object CallerHmiManager : CallerBase() {
|
||||
private val waringProviderApi: IMoGoWaringProvider
|
||||
get() = getApiInstance(IMoGoWaringProvider::class.java, MogoServicePaths.PATH_V2X_WARNING)
|
||||
|
||||
private val noticeProviderApi: IMoGoNoticeProvider
|
||||
get() = getApiInstance(IMoGoNoticeProvider::class.java, MogoServicePaths.PATH_AI_NOTICE)
|
||||
|
||||
/**
|
||||
* 展示VR下V2X预警
|
||||
@@ -26,11 +30,11 @@ object CallerHmiManager : CallerBase() {
|
||||
* @param tag tag绑定弹窗的标志
|
||||
*/
|
||||
fun showWarningV2X(
|
||||
v2xType: Int,
|
||||
alertContent: String?,
|
||||
ttsContent: String?,
|
||||
tag: String?,
|
||||
listenerIMoGo: IMoGoWarningStatusListener?
|
||||
v2xType: Int,
|
||||
alertContent: String?,
|
||||
ttsContent: String?,
|
||||
tag: String?,
|
||||
listenerIMoGo: IMoGoWarningStatusListener?
|
||||
) {
|
||||
waringProviderApi.showWarningV2X(v2xType, alertContent, ttsContent, tag, listenerIMoGo)
|
||||
}
|
||||
@@ -124,4 +128,13 @@ object CallerHmiManager : CallerBase() {
|
||||
waringProviderApi.showWarning(direction, closeTime)
|
||||
}
|
||||
|
||||
/**
|
||||
* 呈现交通云公告弹窗(hmi)
|
||||
*
|
||||
* @param pushData
|
||||
*/
|
||||
fun showTrafficBanner(pushData: NoticePushData) {
|
||||
noticeProviderApi.showNoticeForTrafficWithData(pushData)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,27 +1,19 @@
|
||||
package com.mogo.eagle.core.function.call.notice;
|
||||
|
||||
import com.mogo.eagle.core.data.notice.NoticePushData;
|
||||
import com.mogo.eagle.core.function.api.notice.IMoGoNoticeProvider;
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase;
|
||||
|
||||
import java.util.HashMap;
|
||||
import static com.mogo.eagle.core.data.constants.MogoServicePaths.PATH_AI_NOTICE;
|
||||
|
||||
/**
|
||||
* @author xiaoyuzhou
|
||||
*/
|
||||
public class CallerNoticeManager extends CallerBase {
|
||||
private HashMap<String, IMoGoNoticeProvider> mListeners = new HashMap<>();
|
||||
|
||||
/**
|
||||
* 添加监听者
|
||||
*/
|
||||
void addListener(String tag, IMoGoNoticeProvider listener) {
|
||||
mListeners.put(tag, listener);
|
||||
private static IMoGoNoticeProvider getNoticeProvider() {
|
||||
return getApiInstance(IMoGoNoticeProvider.class, PATH_AI_NOTICE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 移除监听者
|
||||
*/
|
||||
void removeListener(String tag) {
|
||||
mListeners.remove(tag);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user