[add] 1.添加push推送数据体bean 2.添加caller调hmi UI调起流程相关java类文件

This commit is contained in:
liujing
2021-10-28 20:09:04 +08:00
parent f1be75c2f6
commit f4e5949b4e
10 changed files with 224 additions and 73 deletions

View File

@@ -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)
}
}

View File

@@ -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);
}
}