From 88fb409a3934e5b41f926d11534c1203fad7f511 Mon Sep 17 00:00:00 2001 From: donghongyu Date: Wed, 5 Jan 2022 17:05:05 +0800 Subject: [PATCH 1/4] =?UTF-8?q?[Fix]=20=E4=BF=AE=E5=A4=8D=E5=9B=A0?= =?UTF-8?q?=E4=B8=BA=E5=B7=A5=E6=8E=A7=E6=9C=BA=E6=95=B0=E6=8D=AE=E9=80=9A?= =?UTF-8?q?=E9=81=93=E8=BF=87=E6=97=A9=E5=BB=BA=E7=AB=8B=E8=BF=9E=E6=8E=A5?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E6=B8=B2=E6=9F=93=E5=B4=A9=E6=BA=83=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: donghongyu --- .../function/main/MainMoGoApplication.java | 5 ++--- .../function/smp/SmallMapDirectionView.java | 15 --------------- .../network/TrafficLightNetWorkModel.kt | 2 +- .../core/data/config/HdMapBuildConfig.kt | 7 +++++++ .../CallerAutopilotIdentifyListenerManager.kt | 9 +++++---- .../mogo/map/impl/custom/AMapViewWrapper.java | 19 ++++++++++++------- .../module/adas/OnAdasListenerAdapter.java | 7 +++++-- .../com/mogo/module/main/MainActivity.java | 15 ++++++--------- .../module/main/service/MogoMainService.java | 3 +++ 9 files changed, 41 insertions(+), 41 deletions(-) diff --git a/core/function-impl/mogo-core-function-main/src/main/java/com/mogo/eagle/core/function/main/MainMoGoApplication.java b/core/function-impl/mogo-core-function-main/src/main/java/com/mogo/eagle/core/function/main/MainMoGoApplication.java index 779d0671cd..56b849f3e7 100644 --- a/core/function-impl/mogo-core-function-main/src/main/java/com/mogo/eagle/core/function/main/MainMoGoApplication.java +++ b/core/function-impl/mogo-core-function-main/src/main/java/com/mogo/eagle/core/function/main/MainMoGoApplication.java @@ -329,7 +329,8 @@ public abstract class MainMoGoApplication extends AbsMogoApplication { MogoModulePaths.addModuleFunctionServer(new MogoModule(MogoServicePaths.PATH_V2X_OBU_MOGO, "IMoGoObuProvider")); // 超视距,路测、行车记录仪监控 MogoModulePaths.addModuleFunctionServer(new MogoModule(MogoServicePaths.PATH_AI_MONITORING, "IMoGoMonitoringProvider")); - + // 云公告发布 + MogoModulePaths.addModuleFunctionServer(new MogoModule(MogoServicePaths.PATH_AI_NOTICE, "IMoGoNoticeProvider")); // V2X 模块 MogoModulePaths.addBaseModule(new MogoModule(MogoServicePaths.PATH_V2X_MODULE, "V2XProvider")); @@ -345,8 +346,6 @@ public abstract class MainMoGoApplication extends AbsMogoApplication { MogoModulePaths.addBaseModule(new MogoModule(MogoServicePaths.PATH_V2X_FRONT_CRASH_WARNING, "IV2XManagerProvider")); // 全局语音唤醒 MogoModulePaths.addBaseModule(new MogoModule(MogoServicePaths.PATH_GLOBAL_UNWAKE, "GlobalUnwake")); - // 云公告发布 - MogoModulePaths.addModuleFunction(new MogoModule(MogoServicePaths.PATH_AI_NOTICE, "IMoGoNoticeProvider")); if (!DebugConfig.isLauncher()) { PersistentManager.getInstance().initManager(this); diff --git a/core/function-impl/mogo-core-function-smp/src/main/java/com/mogo/eagle/core/function/smp/SmallMapDirectionView.java b/core/function-impl/mogo-core-function-smp/src/main/java/com/mogo/eagle/core/function/smp/SmallMapDirectionView.java index cf8c67d41f..0f9493c9f1 100644 --- a/core/function-impl/mogo-core-function-smp/src/main/java/com/mogo/eagle/core/function/smp/SmallMapDirectionView.java +++ b/core/function-impl/mogo-core-function-smp/src/main/java/com/mogo/eagle/core/function/smp/SmallMapDirectionView.java @@ -36,7 +36,6 @@ import com.mogo.eagle.core.function.call.map.CallerMapLocationListenerManager; import com.mogo.eagle.core.function.smp.utils.MapAssetStyleUtils; import com.mogo.eagle.core.function.smp.view.ISmallMapDirectionView; import com.mogo.eagle.core.widget.RoundLayout; -import com.mogo.module.common.MogoApisHandler; import com.mogo.module.common.utils.DrivingDirectionUtils; import com.mogo.utils.logger.Logger; @@ -100,20 +99,6 @@ public class SmallMapDirectionView // 注册定位监听 CallerMapLocationListenerManager.INSTANCE.addListener(TAG, this); - - setOnLongClickListener(view -> { - MogoApisHandler.getInstance().getApis() - .getMapServiceApi() - .getMapUIController() - .changeMapMode( - MogoApisHandler.getInstance() - .getApis() - .getAdasControllerApi() - .getCurrentSkinMode() - ); - return false; - }); - } @Override diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/trafficlight/network/TrafficLightNetWorkModel.kt b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/trafficlight/network/TrafficLightNetWorkModel.kt index 107e3104a8..4b33655f13 100644 --- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/trafficlight/network/TrafficLightNetWorkModel.kt +++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/trafficlight/network/TrafficLightNetWorkModel.kt @@ -41,7 +41,7 @@ class TrafficLightNetWorkModel { } onSuccess { if (it?.result != null) { - if (it.result.rsCrossId.isNotEmpty() && !it.result.rectLatLngs.isNullOrEmpty()) { + if (!it.result.rsCrossId.isNullOrEmpty() && !it.result.rectLatLngs.isNullOrEmpty()) { onSuccess.invoke(it.result) } else { onError.invoke("requestRoadID result rsCrossId is null") diff --git a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/config/HdMapBuildConfig.kt b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/config/HdMapBuildConfig.kt index 313bc723b5..5c72b376a8 100644 --- a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/config/HdMapBuildConfig.kt +++ b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/config/HdMapBuildConfig.kt @@ -15,4 +15,11 @@ object HdMapBuildConfig { @JvmField var currentCarVrIconRes = R.raw.chuzuche + /** + * 地图是否加载成功 + * false-没有。true-成功 + */ + @JvmField + var isMapLoaded = false + } \ No newline at end of file diff --git a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutopilotIdentifyListenerManager.kt b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutopilotIdentifyListenerManager.kt index fcd34fda26..f474e8bb81 100644 --- a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutopilotIdentifyListenerManager.kt +++ b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutopilotIdentifyListenerManager.kt @@ -5,6 +5,7 @@ import com.mogo.eagle.core.data.autopilot.AutopilotWarnMessage import com.mogo.eagle.core.data.traffic.TrafficData import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotIdentifyListener import com.mogo.eagle.core.function.call.base.CallerBase +import com.mogo.eagle.core.utilcode.mogo.logger.Logger import com.mogo.eagle.core.utilcode.util.LogUtils import java.util.concurrent.ConcurrentHashMap @@ -65,11 +66,11 @@ object CallerAutopilotIdentifyListenerManager : CallerBase() { */ @Synchronized fun invokeAutopilotIdentifyDataUpdate(trafficData: ArrayList?) { - //LogUtils.dTag(TAG, "$trafficData") +// Logger.d(TAG, "$trafficData") M_AUTOPILOT_IDENTIFY_LISTENERS.forEach { val tag = it.key val listener = it.value - //LogUtils.dTag(TAG, "tag:$tag listener:$listener") + // Logger.d(TAG, "tag:$tag listener:$listener") listener.onAutopilotIdentifyDataUpdate(trafficData) } } @@ -79,11 +80,11 @@ object CallerAutopilotIdentifyListenerManager : CallerBase() { */ @Synchronized fun invokeAutopilotWarnMessage(autopilotWarnMessage: AutopilotWarnMessage?) { - //LogUtils.dTag(TAG, "$autopilotWarnMessage") + // Logger.d(TAG, "$autopilotWarnMessage") M_AUTOPILOT_IDENTIFY_LISTENERS.forEach { val tag = it.key val listener = it.value - //LogUtils.dTag(TAG, "tag:$tag listener:$listener") + // Logger.d(TAG, "tag:$tag listener:$listener") listener.onAutopilotWarnMessage(autopilotWarnMessage) } } diff --git a/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/AMapViewWrapper.java b/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/AMapViewWrapper.java index 70906cb9f6..e122a48d7c 100644 --- a/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/AMapViewWrapper.java +++ b/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/AMapViewWrapper.java @@ -347,19 +347,22 @@ public class AMapViewWrapper implements IMogoMapView, if (ui == null) { return; } - // TODO 这里临时修改关闭2D + Logger.d(TAG, "设置的样式 = %s", ui); if (checkAMapView()) { - switch (ui) { + mMapView.getMapAutoViewHelper().setScaleVRMode(true); + mMapView.getMapAutoViewHelper().setMapStyle(MapAutoApi.MAP_STYLE_VR); + // TODO 这里临时修改关闭2D +// switch (ui) { // case CarUp_2D: // case CarUp_3D: // case NorthUP_2D: // setUIMode(ui); // break; - case Type_VR: - mMapView.getMapAutoViewHelper().setScaleVRMode(true); - mMapView.getMapAutoViewHelper().setMapStyle(MapAutoApi.MAP_STYLE_VR); - return; +// case Type_VR: +// mMapView.getMapAutoViewHelper().setScaleVRMode(true); +// mMapView.getMapAutoViewHelper().setMapStyle(MapAutoApi.MAP_STYLE_VR); +// return; // case Type_Light: // mMapView.getMapAutoViewHelper().setAutoSwitchStyle(false); // mMapView.getMapAutoViewHelper().setMapStyle(MapAutoApi.MAP_STYLE_DAY); @@ -373,7 +376,7 @@ public class AMapViewWrapper implements IMogoMapView, // case Type_AUTO_LIGHT_Night: // mMapView.getMapAutoViewHelper().setAutoSwitchStyle(true); // break; - } +// } } } @@ -888,11 +891,13 @@ public class AMapViewWrapper implements IMogoMapView, // @Override // public void onMapInit() { // Logger.i(TAG, "autoop--onMapInit: "); +// HdMapBuildConfig.isMapLoaded = true; // MogoMapListenerHandler.getInstance().onMapLoaded(); // } @Override public void onMapLoaded() { + Logger.i(TAG, "autoop--onMapLoaded: "); MapAutoApi.INSTANCE.getMyLocationStyle().myLocationIcon(HdMapBuildConfig.currentCarVrIconRes, true); //修改自车模型,未来需区分车的类型 //mMapView.getMapAutoViewHelper().setRenderFrequency(true, 50);// 地图刷新频率 diff --git a/modules/mogo-module-adas/src/main/java/com/mogo/module/adas/OnAdasListenerAdapter.java b/modules/mogo-module-adas/src/main/java/com/mogo/module/adas/OnAdasListenerAdapter.java index 18ff9d0f7e..d7ce7797f5 100644 --- a/modules/mogo-module-adas/src/main/java/com/mogo/module/adas/OnAdasListenerAdapter.java +++ b/modules/mogo-module-adas/src/main/java/com/mogo/module/adas/OnAdasListenerAdapter.java @@ -9,6 +9,7 @@ import com.mogo.eagle.core.data.autopilot.AutopilotRouteInfo; import com.mogo.eagle.core.data.autopilot.AutopilotStationInfo; import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo; import com.mogo.eagle.core.data.autopilot.AutopilotWarnMessage; +import com.mogo.eagle.core.data.config.HdMapBuildConfig; import com.mogo.eagle.core.data.traffic.TrafficData; import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager; import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotCarStatusListenerManager; @@ -46,8 +47,10 @@ public class OnAdasListenerAdapter implements OnAdasListener { @Override public void onRectData(RectInfo rectInfo) { - ArrayList recognizedListResults = AdasObjectUtils.INSTANCE.regroupTrafficDataData(rectInfo.getModels()); - CallerAutopilotIdentifyListenerManager.INSTANCE.invokeAutopilotIdentifyDataUpdate(recognizedListResults); + if (HdMapBuildConfig.isMapLoaded) { + ArrayList recognizedListResults = AdasObjectUtils.INSTANCE.regroupTrafficDataData(rectInfo.getModels()); + CallerAutopilotIdentifyListenerManager.INSTANCE.invokeAutopilotIdentifyDataUpdate(recognizedListResults); + } } diff --git a/modules/mogo-module-main/src/main/java/com/mogo/module/main/MainActivity.java b/modules/mogo-module-main/src/main/java/com/mogo/module/main/MainActivity.java index afd2e44252..c7e98c9cff 100644 --- a/modules/mogo-module-main/src/main/java/com/mogo/module/main/MainActivity.java +++ b/modules/mogo-module-main/src/main/java/com/mogo/module/main/MainActivity.java @@ -18,7 +18,6 @@ import androidx.constraintlayout.widget.ConstraintLayout; import androidx.fragment.app.Fragment; import com.alibaba.android.arouter.launcher.ARouter; -import com.mogo.commons.AbsMogoApplication; import com.mogo.commons.context.ContextHolderUtil; import com.mogo.commons.debug.DebugConfig; import com.mogo.commons.mvp.BaseFragment; @@ -221,13 +220,11 @@ public class MainActivity extends MvpActivity implement MogoModulesManager.getInstance().init(this); - if (DebugConfig.isMapBased()) { - if (mServiceApis.getMapServiceApi() != null) { - mServiceApis.getMapServiceApi().getHostListenerRegister().registerHostMapListener(EventDispatchCenter.getInstance()); - mServiceApis.getMapServiceApi().getHostListenerRegister().registerHostNaviListener(EventDispatchCenter.getInstance()); - mServiceApis.getMapServiceApi().getHostListenerRegister().registerHostAimlessModeListener(EventDispatchCenter.getInstance()); - mServiceApis.getMapServiceApi().getHostListenerRegister().registerMarkerClickListener(EventDispatchCenter.getInstance()); - } + if (mServiceApis.getMapServiceApi() != null) { + mServiceApis.getMapServiceApi().getHostListenerRegister().registerHostMapListener(EventDispatchCenter.getInstance()); + mServiceApis.getMapServiceApi().getHostListenerRegister().registerHostNaviListener(EventDispatchCenter.getInstance()); + mServiceApis.getMapServiceApi().getHostListenerRegister().registerHostAimlessModeListener(EventDispatchCenter.getInstance()); + mServiceApis.getMapServiceApi().getHostListenerRegister().registerMarkerClickListener(EventDispatchCenter.getInstance()); } initAdasControlStatusListener(); @@ -242,11 +239,11 @@ public class MainActivity extends MvpActivity implement @Override public void run() { loadOthersModules(); + loadFunctionFragment(); } }, 1000); Log.i(TAG, "App launch timer cost " + (System.currentTimeMillis() - start) + "ms"); }); - loadFunctionFragment(); loadFunctionMapView(); } else { loadOthersModules(); diff --git a/modules/mogo-module-main/src/main/java/com/mogo/module/main/service/MogoMainService.java b/modules/mogo-module-main/src/main/java/com/mogo/module/main/service/MogoMainService.java index 400af3a09a..8cb9813950 100644 --- a/modules/mogo-module-main/src/main/java/com/mogo/module/main/service/MogoMainService.java +++ b/modules/mogo-module-main/src/main/java/com/mogo/module/main/service/MogoMainService.java @@ -8,6 +8,7 @@ import androidx.annotation.Nullable; import com.alibaba.android.arouter.facade.annotation.Route; import com.mogo.commons.AbsMogoApplication; +import com.mogo.eagle.core.data.config.HdMapBuildConfig; import com.mogo.map.location.IMogoLocationClient; import com.mogo.map.location.IMogoLocationListener; import com.mogo.eagle.core.data.map.MogoLocation; @@ -44,10 +45,12 @@ class MogoMainService extends Service implements IMogoLocationListener { mServiceApis = MogoApisHandler.getInstance().getApis(); initAndStartLocation(); UiThreadHandler.postDelayed(() -> { + Logger.d(TAG, "4秒已过,启动基础服务……"); loadBaseModules(); startTanluService(); initADAS(); initGpsSimulatorListener(); + HdMapBuildConfig.isMapLoaded = true; }, 4_000L ); // 开启延时检测 From 57dbfbba3e97ee1e52d86b6f4dd9075fbea1fa75 Mon Sep 17 00:00:00 2001 From: donghongyu Date: Wed, 5 Jan 2022 18:28:43 +0800 Subject: [PATCH 2/4] =?UTF-8?q?[Fix]=20=E5=A2=9E=E5=8A=A0=E5=88=9D?= =?UTF-8?q?=E5=A7=8B=E5=8C=96=E5=BB=B6=E6=97=B6=EF=BC=8C=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E7=A8=B3=E5=AE=9A=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: donghongyu --- .../function/main/MainMoGoApplication.java | 4 +- .../mogo/map/impl/custom/AMapViewWrapper.java | 86 ------------------- .../src/main/AndroidManifest.xml | 1 + .../com/mogo/module/main/MainActivity.java | 7 +- 4 files changed, 8 insertions(+), 90 deletions(-) diff --git a/core/function-impl/mogo-core-function-main/src/main/java/com/mogo/eagle/core/function/main/MainMoGoApplication.java b/core/function-impl/mogo-core-function-main/src/main/java/com/mogo/eagle/core/function/main/MainMoGoApplication.java index 56b849f3e7..e90232a84a 100644 --- a/core/function-impl/mogo-core-function-main/src/main/java/com/mogo/eagle/core/function/main/MainMoGoApplication.java +++ b/core/function-impl/mogo-core-function-main/src/main/java/com/mogo/eagle/core/function/main/MainMoGoApplication.java @@ -340,12 +340,12 @@ public abstract class MainMoGoApplication extends AbsMogoApplication { MogoModulePaths.addModule(new MogoModule(PushUIConstants.PATH, PushUIConstants.NAME)); // 碰撞报警模块 MogoModulePaths.addBaseModule(new MogoModule(MogoServicePaths.PATH_CRASH_WARNING, "IMogoCrashWarnProvider")); - // ADAS模块(旧,慢慢被 域控制器模块 替换掉) - MogoModulePaths.addBaseModule(new MogoModule(MogoServicePaths.PATH_ADAS, "AdasProvider")); // 前方碰撞预警 MogoModulePaths.addBaseModule(new MogoModule(MogoServicePaths.PATH_V2X_FRONT_CRASH_WARNING, "IV2XManagerProvider")); // 全局语音唤醒 MogoModulePaths.addBaseModule(new MogoModule(MogoServicePaths.PATH_GLOBAL_UNWAKE, "GlobalUnwake")); + // ADAS模块(旧,慢慢被 域控制器模块 替换掉) + MogoModulePaths.addBaseModule(new MogoModule(MogoServicePaths.PATH_ADAS, "AdasProvider")); if (!DebugConfig.isLauncher()) { PersistentManager.getInstance().initManager(this); diff --git a/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/AMapViewWrapper.java b/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/AMapViewWrapper.java index e122a48d7c..c6027d1739 100644 --- a/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/AMapViewWrapper.java +++ b/libraries/map-custom/src/main/java/com/mogo/map/impl/custom/AMapViewWrapper.java @@ -5,19 +5,14 @@ import static com.mogo.map.uicontroller.VisualAngleMode.MODE_LONG_SIGHT; import static com.mogo.map.uicontroller.VisualAngleMode.MODE_MEDIUM_SIGHT; import android.content.Context; -import android.graphics.Color; import android.graphics.Point; import android.graphics.Rect; -import android.graphics.Typeface; import android.location.Location; import android.os.Bundle; import android.os.Trace; -import android.text.TextUtils; import android.util.Log; import android.view.MotionEvent; import android.view.View; -import android.view.ViewGroup; -import android.widget.TextView; import com.mogo.commons.constants.SharedPrefsConstants; import com.mogo.commons.debug.DebugConfig; @@ -113,7 +108,6 @@ public class AMapViewWrapper implements IMogoMapView, private boolean mMapLoaded = false; private boolean mIsFirstLocated = true; private boolean mIsDelayed = false; - private Marker mSelfMarker; public AMapViewWrapper(MapAutoView mMapView) { startTime = System.currentTimeMillis(); @@ -274,7 +268,6 @@ public class AMapViewWrapper implements IMogoMapView, mMapView.setOnMapClickListener(null); mMapView.getLocationClient().unRegisterListener(this); mMapView.setOnCameraChangeListener(null); - mSelfMarker = null; Logger.d(TAG, "map onDestroy"); } } @@ -798,85 +791,6 @@ public class AMapViewWrapper implements IMogoMapView, MapStyleController.getInstance().onLocationChanged(location, this); } } - - if (mSelfMarker == null) { - try { - mSelfMarker = mMapView.getMapAutoViewHelper().getMyLocationStyle().getSelfMarker(); - mSelfMarker.setInfoWindowEnable(true); - } catch (Exception e) { - e.printStackTrace(); - } - } else { -// 通过不同的方向类型来改变车模,目前暂定三种模型,drawlevel 1 绿,2 黄,3 红,绿色的时候需要把相应的切换为默认模型 -// Logger.d("liyz", " mDrawlevel = " + mDrawlevel); -// if (mDrawlevel == 1 && isShowWarn) { -// mSelfMarker.marker3DIcon(R.raw.car); -// isShowWarn = false; -// } else if (mDrawlevel == 2) { //不处理 -// -// } else if (mDrawlevel == 3 && !isShowWarn) { -// //继续判断相应的方位,目前是只有 前方 TODO -// mSelfMarker.marker3DIcon(R.raw.qfpz); -// isShowWarn = true; -// } -// -// UiThreadHandler.postDelayed(() -> { -// if (!isShowWarn) { -// mSelfMarker.marker3DIcon(R.raw.qfpz); -// isShowWarn = true; -// } -// }, 6_000L); - - } - //showSelfSpeed(location.getSpeed()); - } - - private TextView mSpeedView = null; - private int mLastYOffset = 20; - - private void showSelfSpeed(float speed) { - - if (!checkAMapView()) { - return; - } - - if (mSelfMarker == null) { - return; - } - if (mCurrentUI != EnumMapUI.Type_VR) { - mSelfMarker.hideInfoWindow(); - return; - } - - int speedIntVal = (int) (speed * 3.6); - if (speedIntVal <= 0) { - mSelfMarker.hideInfoWindow(); - return; - } - - String speedVal = String.valueOf(speedIntVal); - String infoResName = ResIdCache.getVal(speedVal); - int offset = 20; - if (!mMapView.getMapAutoViewHelper().getLockMode()) { - offset = 30; - } - if (offset != mLastYOffset) { - mLastYOffset = offset; - } - mSelfMarker.setInfoWindowOffset(0, offset); - if (TextUtils.isEmpty(infoResName)) { - if (mSpeedView == null) { - mSpeedView = new TextView(mMapView.getContext()); - mSpeedView.setTextColor(Color.WHITE); - mSpeedView.setTypeface(Typeface.defaultFromStyle(Typeface.BOLD)); - mSpeedView.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT)); - } - mSpeedView.setText(speedVal); - mSelfMarker.setInfoWindowView(mSpeedView); - ResIdCache.putVal(speedVal, mSelfMarker.getMarkeOptions().getMarkerInfoName()); - } else { - mSelfMarker.setMarkerInfoName(infoResName); - } } @Override diff --git a/modules/mogo-module-main/src/main/AndroidManifest.xml b/modules/mogo-module-main/src/main/AndroidManifest.xml index 90e40ed1eb..669e61422b 100644 --- a/modules/mogo-module-main/src/main/AndroidManifest.xml +++ b/modules/mogo-module-main/src/main/AndroidManifest.xml @@ -1,6 +1,7 @@ + implement loadOthersModules(); loadFunctionFragment(); } - }, 1000); + }, 3000); Log.i(TAG, "App launch timer cost " + (System.currentTimeMillis() - start) + "ms"); }); loadFunctionMapView(); @@ -288,7 +290,6 @@ public class MainActivity extends MvpActivity implement // 启动一些基本的服务:定位等 startBaseService(); - } private void initAdasControlStatusListener() { @@ -318,6 +319,7 @@ public class MainActivity extends MvpActivity implement @Override public void loadFunctionFragment() { + Logger.d(TAG,"loadFunctionFragment……"); // 加载 HMI 图层 BaseFragment fragmentHdMap = (BaseFragment) ARouter.getInstance().build(MoGoFragmentPaths.PATH_FRAGMENT_HMI).navigation(); addFragment(fragmentHdMap, fragmentHdMap.getTagName(), R.id.module_main_id_waring_fragment); @@ -457,6 +459,7 @@ public class MainActivity extends MvpActivity implement SchemeIntent.getInstance().clear(); FloatingViewHandler.clear(); mServiceApis.getShareManager().releaseContext(); + ProcessUtils.killAllBackgroundProcesses(); } @Override From 6f011bd51c74e6ca7ae559175d5608ef42781f7a Mon Sep 17 00:00:00 2001 From: donghongyu Date: Wed, 5 Jan 2022 19:29:37 +0800 Subject: [PATCH 3/4] =?UTF-8?q?[Fix]=20=E7=BB=99220=E4=BD=BF=E7=94=A8=200.?= =?UTF-8?q?0.57.2=202.1.15.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复内容: 1、延时加载工控机连接 2、修复频繁闪退问题 Signed-off-by: donghongyu --- gradle.properties | 154 +++++++++++++++++++++++----------------------- 1 file changed, 77 insertions(+), 77 deletions(-) diff --git a/gradle.properties b/gradle.properties index 3e860a52f9..05d6b408b6 100644 --- a/gradle.properties +++ b/gradle.properties @@ -37,7 +37,7 @@ kapt.include.compile.classpath=false android.useAndroidX=true # Automatically convert third-party libraries to use AndroidX android.enableJetifier=true -android.jetifier.blacklist=module-service-2.1.15.1.aar +android.jetifier.blacklist=module-service-2.1.15.2.aar ## maven 配置 RELEASE_REPOSITORY_URL=http://nexus.zhidaoauto.com/repository/maven-releases/ SNAPSHOT_REPOSITORY_URL=http://nexus.zhidaoauto.com/repository/maven-snapshots/ @@ -89,102 +89,102 @@ applicationName=IntelligentPilot versionCode=80007 versionName=8.0.15 ################# 新架构模块Maven版本管理 ################# -MOGO_CORE_FUNCTION_AUTOPILOT_VERSION=0.0.57.1 -MOGO_CORE_FUNCTION_CHECK_VERSION=0.0.57.1 -MOGO_CORE_FUNCTION_HMI_VERSION=0.0.57.1 -MOGO_CORE_FUNCTION_MAIN_VERSION=0.0.57.1 -MOGO_CORE_FUNCTION_MAP_VERSION=0.0.57.1 -MOGO_CORE_FUNCTION_MONITORING_VERSION=0.0.57.1 -MOGO_CORE_FUNCTION_NOTICE_VERSION=0.0.57.1 -MOGO_CORE_FUNCTION_OBU_MOGO_VERSION=0.0.57.1 -MOGO_CORE_FUNCTION_SMP_VERSION=0.0.57.1 -MOGO_CORE_FUNCTION_V2X_VERSION=0.0.57.1 -MOGO_CORE_DATA_VERSION=0.0.57.1 -MOGO_CORE_FUNCTION_API_VERSION=0.0.57.1 -MOGO_CORE_FUNCTION_CALL_VERSION=0.0.57.1 -MOGO_CORE_RES_VERSION=0.0.57.1 -MOGO_CORE_UTILS_VERSION=0.0.57.1 -MOGO_CORE_NETWORK_VERSION=0.0.57.1 +MOGO_CORE_FUNCTION_AUTOPILOT_VERSION=0.0.57.2 +MOGO_CORE_FUNCTION_CHECK_VERSION=0.0.57.2 +MOGO_CORE_FUNCTION_HMI_VERSION=0.0.57.2 +MOGO_CORE_FUNCTION_MAIN_VERSION=0.0.57.2 +MOGO_CORE_FUNCTION_MAP_VERSION=0.0.57.2 +MOGO_CORE_FUNCTION_MONITORING_VERSION=0.0.57.2 +MOGO_CORE_FUNCTION_NOTICE_VERSION=0.0.57.2 +MOGO_CORE_FUNCTION_OBU_MOGO_VERSION=0.0.57.2 +MOGO_CORE_FUNCTION_SMP_VERSION=0.0.57.2 +MOGO_CORE_FUNCTION_V2X_VERSION=0.0.57.2 +MOGO_CORE_DATA_VERSION=0.0.57.2 +MOGO_CORE_FUNCTION_API_VERSION=0.0.57.2 +MOGO_CORE_FUNCTION_CALL_VERSION=0.0.57.2 +MOGO_CORE_RES_VERSION=0.0.57.2 +MOGO_CORE_UTILS_VERSION=0.0.57.2 +MOGO_CORE_NETWORK_VERSION=0.0.57.2 ################# 旧版本架构模块版本 ################# ## 工程内模块 -MOGO_COMMONS_VERSION=2.1.15.1 -MOGO_UTILS_VERSION=2.1.15.1 -MAP_AMAP_VERSION=2.1.15.1 -MAP_AUTONAVI_VERSION=2.1.15.1 -MOGO_MAP_VERSION=2.1.15.1 -MOGO_MAP_API_VERSION=2.1.15.1 -MOGO_SERVICE_VERSION=2.1.15.1 -MOGO_SERVICE_API_VERSION=2.1.15.1 -MOGO_CONNECTION_VERSION=2.1.15.1 -MOGO_MODULE_APPS_VERSION=2.1.15.1 -MOGO_MODULE_NAVI_VERSION=2.1.15.1 -MOGO_MODULE_SHARE_VERSION=2.1.15.1 -MOGO_MODULE_COMMON_VERSION=2.1.15.1 -MOGO_MODULE_MAIN_VERSION=2.1.15.1 -MOGO_MODULE_MAP_VERSION=2.1.15.1 -MOGO_MODULE_SERVICE_VERSION=2.1.15.1 -MOGO_MODULE_EXTENSIONS_VERSION=2.1.15.1 -MOGO_MODULE_SEARCH_VERSION=2.1.15.1 -MOGO_MODULE_BACK_VERSION=2.1.15.1 -MOGO_MODULE_V2X_VERSION=2.1.15.1 +MOGO_COMMONS_VERSION=2.1.15.2 +MOGO_UTILS_VERSION=2.1.15.2 +MAP_AMAP_VERSION=2.1.15.2 +MAP_AUTONAVI_VERSION=2.1.15.2 +MOGO_MAP_VERSION=2.1.15.2 +MOGO_MAP_API_VERSION=2.1.15.2 +MOGO_SERVICE_VERSION=2.1.15.2 +MOGO_SERVICE_API_VERSION=2.1.15.2 +MOGO_CONNECTION_VERSION=2.1.15.2 +MOGO_MODULE_APPS_VERSION=2.1.15.2 +MOGO_MODULE_NAVI_VERSION=2.1.15.2 +MOGO_MODULE_SHARE_VERSION=2.1.15.2 +MOGO_MODULE_COMMON_VERSION=2.1.15.2 +MOGO_MODULE_MAIN_VERSION=2.1.15.2 +MOGO_MODULE_MAP_VERSION=2.1.15.2 +MOGO_MODULE_SERVICE_VERSION=2.1.15.2 +MOGO_MODULE_EXTENSIONS_VERSION=2.1.15.2 +MOGO_MODULE_SEARCH_VERSION=2.1.15.2 +MOGO_MODULE_BACK_VERSION=2.1.15.2 +MOGO_MODULE_V2X_VERSION=2.1.15.2 # 探路 -MOGO_MODULE_TANLU_VERSION=2.1.15.1 +MOGO_MODULE_TANLU_VERSION=2.1.15.2 # 推送 -MOGO_MODULE_PUSH_VERSION=2.1.15.1 -MOGO_MODULE_PUSH_BASE_VERSION=2.1.15.1 -MOGO_MODULE_PUSH_NOOP_VERSION=2.1.15.1 +MOGO_MODULE_PUSH_VERSION=2.1.15.2 +MOGO_MODULE_PUSH_BASE_VERSION=2.1.15.2 +MOGO_MODULE_PUSH_NOOP_VERSION=2.1.15.2 # 探路上报和分享模块 -TANLULIB_VERSION=2.1.15.1 -MOGO_TANLU_API_VERSION=2.1.15.1 +TANLULIB_VERSION=2.1.15.2 +MOGO_TANLU_API_VERSION=2.1.15.2 #左侧面板模块 -MOGO_MODULE_LEFT_PANEL_VERSION=2.1.15.1 -MOGO_MODULE_LEFT_PANEL_NOOP_VERSION=2.1.15.1 +MOGO_MODULE_LEFT_PANEL_VERSION=2.1.15.2 +MOGO_MODULE_LEFT_PANEL_NOOP_VERSION=2.1.15.2 # 小控件 -MOGO_MODULE_WIDGETS_VERSION=2.1.15.1 +MOGO_MODULE_WIDGETS_VERSION=2.1.15.2 # obu -MOGO_MODULE_OBU_VERSION=2.1.15.1 -MOGO_MODULE_OBU_MOGO_VERSION=2.1.15.1 +MOGO_MODULE_OBU_VERSION=2.1.15.2 +MOGO_MODULE_OBU_MOGO_VERSION=2.1.15.2 # monitor -MOGO_MODULE_MONITOR_VERSION=2.1.15.1 +MOGO_MODULE_MONITOR_VERSION=2.1.15.2 # bugly -CRASHREPORT_VERSION=2.1.15.1 -CRASHREPORT_BUGLY_VERSION=2.1.15.1 -CRASHREPORT_NOOP_VERSION=2.1.15.1 -CRASHREPORT_UPGRADE_VERSION=2.1.15.1 +CRASHREPORT_VERSION=2.1.15.2 +CRASHREPORT_BUGLY_VERSION=2.1.15.2 +CRASHREPORT_NOOP_VERSION=2.1.15.2 +CRASHREPORT_UPGRADE_VERSION=2.1.15.2 ## tts -TTS_BASE_VERSION=2.1.15.1 -TTS_DI_VERSION=2.1.15.1 -TTS_ZHI_VERSION=2.1.15.1 -TTS_PAD_VERSION=2.1.15.1 -TTS_NOOP_VERSION=2.1.15.1 +TTS_BASE_VERSION=2.1.15.2 +TTS_DI_VERSION=2.1.15.2 +TTS_ZHI_VERSION=2.1.15.2 +TTS_PAD_VERSION=2.1.15.2 +TTS_NOOP_VERSION=2.1.15.2 # 自研地图 -MAP_CUSTOM_VERSION=2.1.15.1 -MOGO_MODULE_ADAS_VERSION=2.1.15.1 +MAP_CUSTOM_VERSION=2.1.15.2 +MOGO_MODULE_ADAS_VERSION=2.1.15.2 # 基础服务实现:passport、socket、location -MOGO_BASE_WEBSOCKET_SDK_VERSION=2.1.15.1 -MOGO_BASE_SERVICES_APK_VERSION=2.1.15.1 -MOGO_BASE_SERVICES_SDK_VERSION=2.1.15.1 -MOGO_MODULE_CHAT_VERSION=2.1.15.1 +MOGO_BASE_WEBSOCKET_SDK_VERSION=2.1.15.2 +MOGO_BASE_SERVICES_APK_VERSION=2.1.15.2 +MOGO_BASE_SERVICES_SDK_VERSION=2.1.15.2 +MOGO_MODULE_CHAT_VERSION=2.1.15.2 # 车聊聊 -MOGO_MODULE_CARCHATTING_VERSION=2.1.15.1 +MOGO_MODULE_CARCHATTING_VERSION=2.1.15.2 # 车聊聊接口 -MOGO_MODULE_CARCHATTINGPROVIDER_VERSION=2.1.15.1 +MOGO_MODULE_CARCHATTINGPROVIDER_VERSION=2.1.15.2 # 皮肤 -MOGO_SKIN_SUPPORT_VERSION=2.1.15.1 -MOGO_SKIN_LIGHT_VERSION=2.1.15.1 -MOGO_SKIN_SUPPORT_IMPL_VERSION=2.1.15.1 -MOGO_SKIN_SUPPORT_NOOP_VERSION=2.1.15.1 -SKIN_SUPPORT_VERSION=2.1.15.1 -SKIN_SUPPORT_APPCOMPAT_VERSION=2.1.15.1 -SKIN_SUPPORT_CARDVIEW_VERSION=2.1.15.1 -SKIN_SUPPORT_CONSTRAINT_LAYOUT_VERSION=2.1.15.1 -SKIN_SUPPORT_DESIGN_VERSION=2.1.15.1 +MOGO_SKIN_SUPPORT_VERSION=2.1.15.2 +MOGO_SKIN_LIGHT_VERSION=2.1.15.2 +MOGO_SKIN_SUPPORT_IMPL_VERSION=2.1.15.2 +MOGO_SKIN_SUPPORT_NOOP_VERSION=2.1.15.2 +SKIN_SUPPORT_VERSION=2.1.15.2 +SKIN_SUPPORT_APPCOMPAT_VERSION=2.1.15.2 +SKIN_SUPPORT_CARDVIEW_VERSION=2.1.15.2 +SKIN_SUPPORT_CONSTRAINT_LAYOUT_VERSION=2.1.15.2 +SKIN_SUPPORT_DESIGN_VERSION=2.1.15.2 # OCH -MOGO_OCH_VERSION=2.1.15.1-test +MOGO_OCH_VERSION=2.1.15.2-test MOGO_OCH_BUS_VERSION=2.0.66 MOGO_OCH_NOOP_VERSION=2.0.66 MOGO_OCH_TAXI_VERSION=2.0.66 # mogoAiCloud sdk services -MOGO_AICLOUD_SERVICES_SDK_VERSION=2.1.15.1 +MOGO_AICLOUD_SERVICES_SDK_VERSION=2.1.15.2 ################# 旧版本架构模块版本 ################# From 1260982a8a0f8a71d5b9c36de5777c2ddb5eac3d Mon Sep 17 00:00:00 2001 From: zhongchao Date: Thu, 6 Jan 2022 17:33:31 +0800 Subject: [PATCH 4/4] fix bug of vip light reset next --- .../eagle/core/function/v2x/vip/VipCarManager.kt | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/vip/VipCarManager.kt b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/vip/VipCarManager.kt index 076856fa6e..a1605c85ca 100644 --- a/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/vip/VipCarManager.kt +++ b/core/function-impl/mogo-core-function-v2x/src/main/java/com/mogo/eagle/core/function/v2x/vip/VipCarManager.kt @@ -43,7 +43,7 @@ class VipCarManager : IMogoOnMessageListener, IMoGoTrafficLightListe private var vip: Boolean = false @Volatile - private var exit: Boolean = true + private var exit: Boolean = false private var result: TrafficLightResult? = null private var lastResult: TrafficLightStatus? = null @@ -99,11 +99,14 @@ class VipCarManager : IMogoOnMessageListener, IMoGoTrafficLightListe if (!vip) { return } - if (!exit) { - Logger.d(TAG, "驶入路口,返回 , then resetConditions") + + if (exit) { + Logger.d(TAG, "驶离路口,返回 , then resetConditions") resetConditions() + exit = false return } + if (trafficLightResult.currentRoadTrafficLight() == null) { Logger.d( TAG, @@ -112,6 +115,7 @@ class VipCarManager : IMogoOnMessageListener, IMoGoTrafficLightListe resetConditions() return } + val currentResult = trafficLightResult.currentRoadTrafficLight() lastResult = result?.currentRoadTrafficLight() Logger.d( @@ -226,7 +230,7 @@ class VipCarManager : IMogoOnMessageListener, IMoGoTrafficLightListe override fun onEnterCrossRoad(enter: Boolean) { super.onEnterCrossRoad(enter) UiThreadHandler.post { - this.exit = enter + this.exit = !enter } }