添加测试代码 - 交警类型公告弹框提示逻辑

This commit is contained in:
liujing
2021-10-29 18:28:29 +08:00
parent a6eca94278
commit f64826c57d
4 changed files with 55 additions and 4 deletions

View File

@@ -2,5 +2,14 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mogo.eagle.core.function.notice">
<application></application>
<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>
</manifest>

View File

@@ -3,6 +3,7 @@ package com.mogo.eagle.core.function.notice.test
import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import android.util.Log
import com.mogo.eagle.core.data.notice.NoticeTrafficStylePushData
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
import com.mogo.utils.logger.Logger
@@ -12,8 +13,8 @@ import com.mogo.utils.logger.Logger
* @description 测试类
* @since: 10/29/21
*/
class TestNoticeBroadcastReceiver: BroadcastReceiver() {
private val TAG = "notice"
class TestNoticeBroadcastReceiver : BroadcastReceiver() {
private val TAG = "AINotice"
private var mContext: Context? = null
override fun onReceive(context: Context?, intent: Intent) {
@@ -29,6 +30,7 @@ class TestNoticeBroadcastReceiver: BroadcastReceiver() {
}
private fun dispatchSceneTest(sceneType: Int) {
Log.d(TAG, "dispatchSceneTest::"+sceneType.toString());
if (sceneType == 301001) {
val pushData = NoticeTrafficStylePushData()
pushData.msg = "交警测试公告"