From a689060eb7880ffa8bcd4aac60cc4aebf8d86ccb Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 28 Jul 2020 09:43:18 +0800 Subject: [PATCH 1/4] fix bug of UI --- .../res/layout-xhdpi-1920x1000/module_authorize_fragment.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/mogo-module-authorize/src/main/res/layout-xhdpi-1920x1000/module_authorize_fragment.xml b/modules/mogo-module-authorize/src/main/res/layout-xhdpi-1920x1000/module_authorize_fragment.xml index 3365c3c4d6..74308d148f 100644 --- a/modules/mogo-module-authorize/src/main/res/layout-xhdpi-1920x1000/module_authorize_fragment.xml +++ b/modules/mogo-module-authorize/src/main/res/layout-xhdpi-1920x1000/module_authorize_fragment.xml @@ -149,7 +149,7 @@ Date: Tue, 28 Jul 2020 09:50:09 +0800 Subject: [PATCH 2/4] fix bug of UI --- .../layout-xhdpi-1920x1000/module_authorize_fragment.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/mogo-module-authorize/src/main/res/layout-xhdpi-1920x1000/module_authorize_fragment.xml b/modules/mogo-module-authorize/src/main/res/layout-xhdpi-1920x1000/module_authorize_fragment.xml index 74308d148f..f3d940ee26 100644 --- a/modules/mogo-module-authorize/src/main/res/layout-xhdpi-1920x1000/module_authorize_fragment.xml +++ b/modules/mogo-module-authorize/src/main/res/layout-xhdpi-1920x1000/module_authorize_fragment.xml @@ -109,9 +109,9 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginLeft="@dimen/dp_301" - android:layout_marginTop="@dimen/dp_110" + android:layout_marginTop="@dimen/dp_100" android:layout_marginRight="@dimen/dp_301" - android:layout_marginBottom="@dimen/dp_110" + android:layout_marginBottom="@dimen/dp_100" android:background="@drawable/module_authorize_selector_dark_corner" android:visibility="gone" app:layout_constraintEnd_toEndOf="parent" @@ -200,7 +200,7 @@ android:layout_height="wrap_content" android:layout_marginTop="@dimen/dp_62" android:textColor="@android:color/white" - android:textSize="@dimen/dp_55" + android:textSize="@dimen/dp_42" android:textStyle="bold" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" From 6f80ae883b17bfcd5cea1d1ff5b417ee53e7df20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=91=A3=E5=AE=8F=E5=AE=87?= Date: Tue, 28 Jul 2020 10:24:05 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E5=8F=AA=E6=9C=89=E8=87=AA=E7=A0=94?= =?UTF-8?q?=E8=BD=A6=E6=9C=BA=E6=89=8D=E6=9C=89=E7=96=B2=E5=8A=B3=E9=A9=BE?= =?UTF-8?q?=E9=A9=B6=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../adapter/holder/V2XRoadEventDetailVH.java | 1 + .../v2x/listener/V2XLocationListener.java | 37 ++++++++++--------- 2 files changed, 21 insertions(+), 17 deletions(-) diff --git a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/adapter/holder/V2XRoadEventDetailVH.java b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/adapter/holder/V2XRoadEventDetailVH.java index 165f912f32..a144024721 100644 --- a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/adapter/holder/V2XRoadEventDetailVH.java +++ b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/adapter/holder/V2XRoadEventDetailVH.java @@ -318,6 +318,7 @@ public class V2XRoadEventDetailVH extends V2XBaseViewHolder { // 重新设置用户信息 mNoveltyInfo.setUserInfo(mUserInfo); + // 只有自研车机才会 有车聊聊通话 if (DebugConfig.getCarMachineType() == DebugConfig.CAR_MACHINE_TYPE_SELF_INNOVATE) { // 判断是否可以打电话 ChartingUtil.isCanCall(b -> { diff --git a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/listener/V2XLocationListener.java b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/listener/V2XLocationListener.java index bf22201dba..0bbc8473b1 100644 --- a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/listener/V2XLocationListener.java +++ b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/listener/V2XLocationListener.java @@ -2,6 +2,7 @@ package com.mogo.module.v2x.listener; import android.content.Context; +import com.mogo.commons.debug.DebugConfig; import com.mogo.map.MogoLatLng; import com.mogo.map.location.IMogoLocationListener; import com.mogo.map.location.MogoLocation; @@ -11,14 +12,14 @@ import com.mogo.map.search.geo.MogoGeocodeResult; import com.mogo.map.search.geo.MogoRegeocodeResult; import com.mogo.module.common.entity.MarkerExploreWay; import com.mogo.module.common.entity.MarkerResponse; -import com.mogo.module.service.Utils; -import com.mogo.module.v2x.V2XConst; -import com.mogo.module.v2x.V2XServiceManager; -import com.mogo.module.v2x.alarm.V2XAlarmServer; import com.mogo.module.common.entity.V2XMessageEntity; import com.mogo.module.common.entity.V2XPoiTypeEnum; import com.mogo.module.common.entity.V2XPushMessageEntity; import com.mogo.module.common.entity.V2XRoadEventEntity; +import com.mogo.module.service.Utils; +import com.mogo.module.v2x.V2XConst; +import com.mogo.module.v2x.V2XServiceManager; +import com.mogo.module.v2x.alarm.V2XAlarmServer; import com.mogo.module.v2x.network.V2XRefreshCallback; import com.mogo.module.v2x.scenario.impl.V2XScenarioManager; import com.mogo.module.v2x.utils.ADASUtils; @@ -126,21 +127,23 @@ public class V2XLocationListener implements IMogoLocationListener, CarStatusList } } - // 疲劳驾驶检测 - V2XAlarmServer.getFatigueDrivingShow(location, drivingShowEntity -> { - Logger.i(V2XConst.MODULE_NAME, "疲劳驾驶POI查询结果为: " + GsonUtil.jsonFromObject(drivingShowEntity)); + // 只有自研车机才有疲劳驾驶检测 + if (DebugConfig.getCarMachineType() == DebugConfig.CAR_MACHINE_TYPE_SELF_INNOVATE) { + V2XAlarmServer.getFatigueDrivingShow(location, drivingShowEntity -> { + Logger.i(V2XConst.MODULE_NAME, "疲劳驾驶POI查询结果为: " + GsonUtil.jsonFromObject(drivingShowEntity)); - String style = V2XServiceManager.getMoGoStatusManager().isMainPageOnResume() ? "1" : "2"; - trackWithType(V2XPoiTypeEnum.ALERT_FATIGUE_DRIVING, drivingShowEntity.getLon(), drivingShowEntity.getLat(), style); + String style = V2XServiceManager.getMoGoStatusManager().isMainPageOnResume() ? "1" : "2"; + trackWithType(V2XPoiTypeEnum.ALERT_FATIGUE_DRIVING, drivingShowEntity.getLon(), drivingShowEntity.getLat(), style); - V2XMessageEntity v2XMessageEntity = new V2XMessageEntity<>(); - v2XMessageEntity.setType(V2XMessageEntity.V2XTypeEnum.ALERT_FATIGUE_DRIVING); - v2XMessageEntity.setContent(drivingShowEntity); - v2XMessageEntity.setShowState(drivingShowEntity.isShowWindow()); - // 广播给ADAS Launcher - ADASUtils.broadcastToADAS(V2XServiceManager.getContext(), drivingShowEntity); - V2XScenarioManager.getInstance().handlerMessage(v2XMessageEntity); - }); + V2XMessageEntity v2XMessageEntity = new V2XMessageEntity<>(); + v2XMessageEntity.setType(V2XMessageEntity.V2XTypeEnum.ALERT_FATIGUE_DRIVING); + v2XMessageEntity.setContent(drivingShowEntity); + v2XMessageEntity.setShowState(drivingShowEntity.isShowWindow()); + // 广播给ADAS Launcher + ADASUtils.broadcastToADAS(V2XServiceManager.getContext(), drivingShowEntity); + V2XScenarioManager.getInstance().handlerMessage(v2XMessageEntity); + }); + } // 巡航处理 V2XRoadEventEntity v2XRoadEventEntity = From 4afaeb740733e5b59aa433e2c2496250f93e83cb Mon Sep 17 00:00:00 2001 From: wangcongtao Date: Tue, 28 Jul 2020 12:29:19 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E7=96=B2=E5=8A=B3=E9=A9=BE=E9=A9=B6?= =?UTF-8?q?=E5=AF=BC=E8=88=AA=E7=9B=91=E5=90=AC=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../v2x/scenario/scene/fatigue/V2XFatigueDrivingWindow.java | 3 +++ .../src/main/res/raw/scenario_fatigue_driving_data.json | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/fatigue/V2XFatigueDrivingWindow.java b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/fatigue/V2XFatigueDrivingWindow.java index 9ce5a57e2b..d1901c1fd4 100644 --- a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/fatigue/V2XFatigueDrivingWindow.java +++ b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/fatigue/V2XFatigueDrivingWindow.java @@ -69,6 +69,7 @@ public class V2XFatigueDrivingWindow extends RelativeLayout mTvAddress = findViewById(R.id.tvAddress); mTvAddressDistance = findViewById(R.id.tvAddressDistance); mIvToNav = findViewById(R.id.ivToNav); + V2XServiceManager.getMogoRegisterCenter().registerMogoNaviListener( "test", this ); mIvToNav.setOnClickListener(v -> startNavi()); } @@ -118,6 +119,7 @@ public class V2XFatigueDrivingWindow extends RelativeLayout handlerV2XEvent.removeCallbacks(runnableV2XEvent); runnableV2XEvent = null; } + //移除窗体 V2XServiceManager .getMogoTopViewManager() @@ -155,6 +157,7 @@ public class V2XFatigueDrivingWindow extends RelativeLayout @Override public void onCalculateSuccess() { + V2XServiceManager.getMogoRegisterCenter().unregisterMogoNaviListener( "test"); V2XServiceManager.getNavi().startNavi(true); } diff --git a/modules/mogo-module-v2x/src/main/res/raw/scenario_fatigue_driving_data.json b/modules/mogo-module-v2x/src/main/res/raw/scenario_fatigue_driving_data.json index afd2eec4c8..e547da75f3 100644 --- a/modules/mogo-module-v2x/src/main/res/raw/scenario_fatigue_driving_data.json +++ b/modules/mogo-module-v2x/src/main/res/raw/scenario_fatigue_driving_data.json @@ -14,9 +14,11 @@ "zoom": true, "zoomScale": 15, "location": { - "lat": 39.9554100000, - "lon": 116.4178276100 + "lat": 39.951326, + "lon": 116.343487 }, + "lat": 39.951326, + "lon": 116.343487, "userHead": "https://yycp-static-1255510688.cos.ap-beijing.myqcloud.com/defaultUserHeadImg/5.png", "msgImgUrl": "https://upload.jianshu.io/users/upload_avatars/7663825/7c28763e-002b-4e89-8dea-5b8da210ef2c.jpg" } \ No newline at end of file