From c0b4f95a321a288ba8e337a98ad6ead8b723c40f Mon Sep 17 00:00:00 2001 From: liujing Date: Tue, 2 Nov 2021 21:05:31 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A4=E6=96=AD=E8=B5=84=E6=BA=90=E4=B8=BA?= =?UTF-8?q?=E5=9B=BE=E7=89=87=E8=BF=98=E6=98=AF=E8=A7=86=E9=A2=91=20?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../eagle/core/function/hmi/ui/MoGoHmiFragment.kt | 2 +- .../function/hmi/ui/notice/NoticeBannerView.java | 2 +- .../function/hmi/ui/notice/NoticeTrafficDialog.java | 3 +-- .../core/function/notice/NoticeSocketManager.java | 8 ++++---- .../core/data/notice/NoticeTrafficStylePushData.java | 12 ++++++------ 5 files changed, 13 insertions(+), 14 deletions(-) diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/MoGoHmiFragment.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/MoGoHmiFragment.kt index aaac4581d0..16cd74ee96 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/MoGoHmiFragment.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/MoGoHmiFragment.kt @@ -243,7 +243,7 @@ class MoGoHmiFragment : MvpFragment .setTag(tag) .setLayout(it2) .setSidePattern(SidePattern.TOP) - .setCountDownTime(5000) + .setCountDownTime(60000) .setGravity(Gravity.CENTER_HORIZONTAL, offsetY = 110) .setImmersionStatusBar(true) .addWarningStatusListener(null) diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/notice/NoticeBannerView.java b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/notice/NoticeBannerView.java index d424a7c4f4..20a580b6f3 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/notice/NoticeBannerView.java +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/notice/NoticeBannerView.java @@ -54,7 +54,7 @@ public class NoticeBannerView extends ConstraintLayout { mPushData = pushData; noticePushTitle.setText(pushData.getMsg()); noticePushContent.setText(pushData.getContent()); - if (pushData.getIsVideo()) { + if (pushData.getType() == 1) { iconImageView.setVisibility(View.VISIBLE); } else { iconImageView.setVisibility(View.INVISIBLE); diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/notice/NoticeTrafficDialog.java b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/notice/NoticeTrafficDialog.java index aeb413d3f1..cfd79fe20a 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/notice/NoticeTrafficDialog.java +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/notice/NoticeTrafficDialog.java @@ -41,7 +41,6 @@ public class NoticeTrafficDialog extends BaseFloatDialog { mContext = context; mPushData = pushData; mPushData.setPoiImgUrl("https://vd2.bdstatic.com/mda-mk1347dzxdmcre0y/sc/cae_h264/1635819498112313003/mda-mk1347dzxdmcre0y.mp4?v_from_s=hkapp-haokan-tucheng&auth_key=1635837585-0-0-5295f6658c7711ba7b4d3ef478a7fbaa&bcevod_channel=searchbox_feed&pd=1&pt=3&abtest="); - mPushData.setIsVideo(true); initView(); } @@ -131,7 +130,7 @@ public class NoticeTrafficDialog extends BaseFloatDialog { * 视频播放 */ private void startLive() { - if (mPushData != null && mPushData.getIsVideo() == true) { + if (mPushData != null) { try { Log.d(TAG, "交警事故开始播放视频startLive"); String videoUrl = mPushData.getPoiImgUrl(); diff --git a/core/function-impl/mogo-core-function-notice/src/main/java/com/mogo/eagle/core/function/notice/NoticeSocketManager.java b/core/function-impl/mogo-core-function-notice/src/main/java/com/mogo/eagle/core/function/notice/NoticeSocketManager.java index a565461744..5934a76b6d 100644 --- a/core/function-impl/mogo-core-function-notice/src/main/java/com/mogo/eagle/core/function/notice/NoticeSocketManager.java +++ b/core/function-impl/mogo-core-function-notice/src/main/java/com/mogo/eagle/core/function/notice/NoticeSocketManager.java @@ -34,15 +34,15 @@ class NoticeSocketManager { Log.d(TAG, "registerSocketMessage"); mContext = context; MogoApisHandler.getInstance().getApis().getSocketManagerApi(context). - registerOnMessageListener(301001, mNoticeMessageListener); + registerOnMessageListener(301001, mtrafficNoticeListener); MogoApisHandler.getInstance().getApis().getSocketManagerApi(context). registerOnMessageListener(100, mNormalNoticeListener); } public void unRegisterSocketMessageListener() { - if (mNoticeMessageListener != null) { + if (mtrafficNoticeListener != null) { MogoApisHandler.getInstance().getApis().getSocketManagerApi(mContext). - unregisterOnMessageListener(301001, mNoticeMessageListener); + unregisterOnMessageListener(301001, mtrafficNoticeListener); MogoApisHandler.getInstance().getApis().getSocketManagerApi(mContext). unregisterOnMessageListener(100, mNormalNoticeListener); } @@ -72,7 +72,7 @@ class NoticeSocketManager { /** * 交警类型公告弹窗 */ - private IMogoOnMessageListener mNoticeMessageListener = new IMogoOnMessageListener() { + private IMogoOnMessageListener mtrafficNoticeListener = new IMogoOnMessageListener() { @Override public Class target() { diff --git a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/notice/NoticeTrafficStylePushData.java b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/notice/NoticeTrafficStylePushData.java index 62670a7962..c10d5b016b 100644 --- a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/notice/NoticeTrafficStylePushData.java +++ b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/notice/NoticeTrafficStylePushData.java @@ -11,7 +11,7 @@ public class NoticeTrafficStylePushData { private String infoId; private String poiImgUrl; private String title; - private boolean isVideo; + private int type; private String content; public String getMsg() { @@ -46,12 +46,12 @@ public class NoticeTrafficStylePushData { this.poiImgUrl = poiImgUrl; } - public boolean getIsVideo() { - return isVideo; + public int getType() { + return type; } - public void setIsVideo(boolean isVideo) { - this.isVideo = isVideo; + public void setType(int type) { + this.type = type; } public String getContent() { @@ -69,7 +69,7 @@ public class NoticeTrafficStylePushData { ", infoId='" + infoId + '\'' + ", poiImgUrl='" + poiImgUrl + '\'' + ", title='" + title + '\'' + - ", isVideo=" + isVideo + + ", type=" + type + ", content='" + content + '\'' + '}'; }