[2.13.0-arch-opt] reduce unuse logic and remove notice to biz

This commit is contained in:
zhongchao
2022-12-29 20:08:38 +08:00
parent e82dc525a3
commit 61b54ee6ba
59 changed files with 37 additions and 3484 deletions

View File

@@ -173,5 +173,11 @@
</intent-filter>
</receiver>
<receiver android:name="com.mogo.eagle.core.function.hmi.receiver.NoticeBroadcastReceiver">
<intent-filter>
<action android:name="com.hmi.notice.control" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</receiver>
</application>
</manifest>

View File

@@ -0,0 +1,43 @@
package com.mogo.eagle.core.function.hmi.receiver
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
/**
* @author Jing
* @description 测试类
* @since: 10/29/21
*/
class NoticeBroadcastReceiver : BroadcastReceiver() {
private var mContext: Context? = null
override fun onReceive(context: Context?, intent: Intent) {
try {
mContext = context
val sceneType = intent.getIntExtra("sceneType", 0)
// 分发场景
dispatchSceneTest(sceneType)
} catch (e: Exception) {
e.printStackTrace()
}
}
private fun dispatchSceneTest(sceneType: Int) {
if (sceneType == 301001) {
val pushData = NoticeTrafficStylePushData()
pushData.msg = "交警任务公告"
pushData.title = "北京市顺义区北小营镇北小营市场发生交通事故,请警务人员前往处理"
//图片
val image: String = "https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fc-ssl.duitang.com%2Fuploads%2Fitem%2F201609%2F26%2F20160926081306_GM2tv.thumb.1000_0.jpeg&refer=http%3A%2F%2Fc-ssl.duitang.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1638511084&t=92def7498b526dcba3fceda17c43fcb8"
//视频
val video: String = "https://view.2amok.com/20200219/012d8e2a55f227e90d76056bb6aab5e4.mp4"
pushData.poiImgUrl = video
pushData.type = 1
pushData.infoId = "909754135789686784"
CallerHmiManager.showTrafficBanner(pushData)
}
}
}

View File

@@ -1,11 +0,0 @@
<?xml version="1.0" encoding="utf-8"?><!--<selector xmlns:android="http://schemas.android.com/apk/res/android">-->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
android:angle="135"
android:endColor="#80000000"
android:startColor="#80000000"
android:type="linear" />
<corners android:radius="@dimen/module_push_ui_bkg_corner" />
</shape>