Merge remote-tracking branch 'origin/dev_MogoAP_eagle-1030_211020_8.0.14' into dev_MogoAP_eagle-1030_211020_8.0.14
# Conflicts: # core/function-impl/mogo-core-function-notice/build.gradle # core/function-impl/mogo-core-function-notice/src/main/java/com/mogo/eagle/core/function/notice/NoticeProvider.java # core/function-impl/mogo-core-function-notice/src/main/java/com/mogo/eagle/core/function/notice/test/TestNoticeBroadcastReceiver.java
This commit is contained in:
@@ -9,12 +9,13 @@ import android.view.animation.OvershootInterpolator
|
||||
import com.mogo.commons.mvp.MvpFragment
|
||||
import com.mogo.commons.voice.AIAssist
|
||||
import com.mogo.eagle.core.data.enums.WarningDirectionEnum
|
||||
import com.mogo.eagle.core.data.notice.NoticePushData
|
||||
import com.mogo.eagle.core.data.notice.NoticeTrafficStylePushData
|
||||
import com.mogo.eagle.core.function.api.hmi.warning.IMoGoWarningStatusListener
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.function.hmi.notification.WarningFloat
|
||||
import com.mogo.eagle.core.function.hmi.notification.anim.DefaultAnimator
|
||||
import com.mogo.eagle.core.function.hmi.notification.enums.SidePattern
|
||||
import com.mogo.eagle.core.function.hmi.ui.notice.NoticeBannerView
|
||||
import com.mogo.eagle.core.function.hmi.ui.widget.V2XNotificationView
|
||||
import com.mogo.module.common.enums.EventTypeEnum
|
||||
import com.mogo.utils.logger.Logger
|
||||
@@ -209,10 +210,13 @@ class MoGoHmiFragment : MvpFragment<MoGoWarningContract.View?, WaringPresenter?>
|
||||
|
||||
/**
|
||||
* 展示云公告顶部弹窗
|
||||
* @param pushData
|
||||
* @param trafficStylePushData
|
||||
*/
|
||||
override fun showNoticeForTrafficWithData(pushData: NoticePushData) {
|
||||
override fun showNoticeForTrafficWithData(trafficStylePushData: NoticeTrafficStylePushData) {
|
||||
activity.let {
|
||||
val noticeBannerView = this.getContext()?.let { it1 -> NoticeBannerView(it1) }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2,7 +2,7 @@ package com.mogo.eagle.core.function.hmi.ui
|
||||
|
||||
import com.mogo.commons.mvp.IView
|
||||
import com.mogo.eagle.core.data.enums.WarningDirectionEnum
|
||||
import com.mogo.eagle.core.data.notice.NoticePushData
|
||||
import com.mogo.eagle.core.data.notice.NoticeTrafficStylePushData
|
||||
import com.mogo.eagle.core.function.api.hmi.warning.IMoGoWarningStatusListener
|
||||
|
||||
|
||||
@@ -99,8 +99,8 @@ interface MoGoWarningContract {
|
||||
|
||||
/**
|
||||
* 展示云公告顶部弹窗
|
||||
* @param pushData
|
||||
* @param trafficStylePushData
|
||||
*/
|
||||
fun showNoticeForTrafficWithData(pushData: NoticePushData)
|
||||
fun showNoticeForTrafficWithData(trafficStylePushData: NoticeTrafficStylePushData)
|
||||
}
|
||||
}
|
||||
@@ -10,7 +10,7 @@ import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
|
||||
import com.mogo.eagle.core.data.notice.NoticeTrafficInfo;
|
||||
import com.mogo.eagle.core.data.notice.NoticeTrafficStyleInfo;
|
||||
import com.mogo.eagle.core.function.hmi.R;
|
||||
|
||||
/**
|
||||
@@ -61,7 +61,7 @@ public class NoticeBannerView extends ConstraintLayout {
|
||||
}
|
||||
|
||||
//数据改变刷新UI
|
||||
public void pushBeanChanged(NoticeTrafficInfo info){
|
||||
public void pushBeanChanged(NoticeTrafficStyleInfo info){
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@ import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.mogo.eagle.core.function.hmi.R;
|
||||
import com.mogo.eagle.core.function.hmi.ui.notice.NoticeBannerView;
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -56,6 +56,7 @@ dependencies {
|
||||
implementation rootProject.ext.dependencies.mogocommons
|
||||
implementation rootProject.ext.dependencies.mogoserviceapi
|
||||
implementation rootProject.ext.dependencies.modulecommon
|
||||
implementation rootProject.ext.dependencies.moduleHmi
|
||||
} else {
|
||||
implementation project(":foudations:mogo-commons")
|
||||
implementation project(':services:mogo-service-api')
|
||||
@@ -66,6 +67,7 @@ dependencies {
|
||||
implementation project(':core:mogo-core-res')
|
||||
implementation project(':core:mogo-core-data')
|
||||
implementation project(':core:mogo-core-network')
|
||||
implementation project(':core:function-impl:mogo-core-function-hmi')
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,13 +2,5 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.mogo.eagle.core.function.notice">
|
||||
|
||||
<application>
|
||||
<receiver android:name=".test.TestNoticeBroadcastReceiver">
|
||||
<intent-filter>
|
||||
<action android:name="com.notice.test_panel_control" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
</application>
|
||||
<application></application>
|
||||
</manifest>
|
||||
@@ -8,8 +8,10 @@ import androidx.fragment.app.Fragment;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths;
|
||||
import com.mogo.eagle.core.data.notice.NoticePushData;
|
||||
import com.mogo.eagle.core.data.notice.NoticeNormalData;
|
||||
import com.mogo.eagle.core.data.notice.NoticeTrafficStylePushData;
|
||||
import com.mogo.eagle.core.function.api.notice.IMoGoNoticeProvider;
|
||||
import com.mogo.eagle.core.function.hmi.ui.MoGoHmiFragment;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
@@ -24,11 +26,13 @@ import org.jetbrains.annotations.Nullable;
|
||||
public class NoticeProvider implements IMoGoNoticeProvider {
|
||||
private String TAG = "AINotice";
|
||||
private Context mContext;
|
||||
private MoGoHmiFragment mMoGoHmiFragment;
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public Fragment createCoverage(@Nullable Context context, @Nullable Bundle data) {
|
||||
return null;
|
||||
mMoGoHmiFragment = new MoGoHmiFragment();
|
||||
return mMoGoHmiFragment;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@@ -50,7 +54,12 @@ public class NoticeProvider implements IMoGoNoticeProvider {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showNoticeForTrafficWithData(NoticePushData pushData) {
|
||||
public void showNoticeForTrafficWithData(NoticeTrafficStylePushData pushData) {
|
||||
mMoGoHmiFragment.showNoticeForTrafficWithData(pushData);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showNoticeNormalData(NoticeNormalData normalData) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
package com.mogo.eagle.core.function.notice.test;
|
||||
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
|
||||
import com.mogo.eagle.core.data.notice.NoticePushData;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
|
||||
/**
|
||||
* @author Jing
|
||||
* @description 描述
|
||||
* @since: 10/28/21
|
||||
*/
|
||||
public class TestNoticeBroadcastReceiver extends BroadcastReceiver {
|
||||
private String TAG = "notice";
|
||||
private Context mContext;
|
||||
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
try {
|
||||
this.mContext = context;
|
||||
int sceneType = intent.getIntExtra("sceneType", 0);
|
||||
Logger.d(TAG, "textPanelOpenType:" + sceneType);
|
||||
// 分发场景
|
||||
dispatchSceneTest(sceneType);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
private void dispatchSceneTest(int sceneType) {
|
||||
if (sceneType == 301001) {
|
||||
NoticePushData pushData = new NoticePushData();
|
||||
pushData.setMsg("交警测试公告");
|
||||
pushData.setContent("交警测试公告内容");
|
||||
// CallerHmiManager.showTrafficBanner(pushData);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.mogo.eagle.core.function.notice.test
|
||||
|
||||
import android.content.BroadcastReceiver
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import com.mogo.eagle.core.data.notice.NoticeTrafficStylePushData
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.utils.logger.Logger
|
||||
|
||||
/**
|
||||
* @author Jing
|
||||
* @description 测试类
|
||||
* @since: 10/29/21
|
||||
*/
|
||||
class TestNoticeBroadcastReceiver: BroadcastReceiver() {
|
||||
private val TAG = "notice"
|
||||
private var mContext: Context? = null
|
||||
|
||||
override fun onReceive(context: Context?, intent: Intent) {
|
||||
try {
|
||||
mContext = context
|
||||
val sceneType = intent.getIntExtra("sceneType", 0)
|
||||
Logger.d(TAG, "textPanelOpenType:$sceneType")
|
||||
// 分发场景
|
||||
dispatchSceneTest(sceneType)
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
}
|
||||
|
||||
private fun dispatchSceneTest(sceneType: Int) {
|
||||
if (sceneType == 301001) {
|
||||
val pushData = NoticeTrafficStylePushData()
|
||||
pushData.msg = "交警测试公告"
|
||||
pushData.content = "交警测试公告内容"
|
||||
CallerHmiManager.showTrafficBanner(pushData)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user