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 6dd2eb1482..d3004d1700 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 @@ -325,7 +325,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")); @@ -337,11 +338,12 @@ public abstract class MainMoGoApplication extends AbsMogoApplication { MogoModulePaths.addBaseModule(new MogoModule(MogoServicePaths.PATH_ADAS, "AdasProvider")); // 全局语音唤醒 MogoModulePaths.addBaseModule(new MogoModule(MogoServicePaths.PATH_GLOBAL_UNWAKE, "GlobalUnwake")); - // 云公告发布 - MogoModulePaths.addModuleFunction(new MogoModule(MogoServicePaths.PATH_AI_NOTICE, "IMoGoNoticeProvider")); + // ADAS模块(旧,慢慢被 域控制器模块 替换掉) + MogoModulePaths.addBaseModule(new MogoModule(MogoServicePaths.PATH_ADAS, "AdasProvider")); if (!DebugConfig.isLauncher()) { - PersistentManager.getInstance().initManager(this); + PersistentManager + .getInstance().initManager(this); } Log.i(TAG, "App launch timer cost " + (System.currentTimeMillis() - start) + "ms"); 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/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 9c1828bc5c..a135ee0bfe 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( @@ -228,7 +232,7 @@ class VipCarManager : IMogoOnMessageListener, IMoGoTrafficLightListe override fun onEnterCrossRoad(enter: Boolean) { super.onEnterCrossRoad(enter) UiThreadHandler.post { - this.exit = enter + this.exit = !enter } } 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/gradle.properties b/gradle.properties index 76d620d06f..93e8865367 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 ################# 旧版本架构模块版本 ################# 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..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"); } } @@ -347,19 +340,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 +369,7 @@ public class AMapViewWrapper implements IMogoMapView, // case Type_AUTO_LIGHT_Night: // mMapView.getMapAutoViewHelper().setAutoSwitchStyle(true); // break; - } +// } } } @@ -795,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 @@ -888,11 +805,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/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 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(); @@ -221,11 +220,11 @@ public class MainActivity extends MvpActivity implement @Override public void run() { loadOthersModules(); + loadFunctionFragment(); } - }, 1000); + }, 3000); Log.i(TAG, "App launch timer cost " + (System.currentTimeMillis() - start) + "ms"); }); - loadFunctionFragment(); loadFunctionMapView(); } else { loadOthersModules(); @@ -270,7 +269,6 @@ public class MainActivity extends MvpActivity implement // 启动一些基本的服务:定位等 startBaseService(); - } private void initAdasControlStatusListener() { @@ -300,6 +298,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); @@ -433,6 +432,7 @@ public class MainActivity extends MvpActivity implement SchemeIntent.getInstance().clear(); FloatingViewHandler.clear(); mServiceApis.getShareManager().releaseContext(); + ProcessUtils.killAllBackgroundProcesses(); } @Override 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 ); // 开启延时检测