diff --git a/.idea/misc.xml b/.idea/misc.xml index adb58a3688..22e6c5a2dd 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -11,21 +11,7 @@ - + \ No newline at end of file diff --git a/app/src/main/java/com/mogo/launcher/MogoApplication.java b/app/src/main/java/com/mogo/launcher/MogoApplication.java index f0d4e55412..12b6db75d7 100644 --- a/app/src/main/java/com/mogo/launcher/MogoApplication.java +++ b/app/src/main/java/com/mogo/launcher/MogoApplication.java @@ -186,43 +186,40 @@ public class MogoApplication extends AbsMogoApplication { // Log.d("TEST-SOCKET","socketTestData cityCode: " + socketTestData.getCityCode()); // return new HttpDnsSimpleLocation(socketTestData.getCityCode(),socketTestData.getLat(),socketTestData.getLon()); //todo 对象唯一实例优化 // }); - clientConfig.setIHttpDnsCurrentLocation(new IHttpDnsCurrentLocation() { - @Override - public HttpDnsSimpleLocation getCurrentLocation() { - MogoLocation mogoLocation = - MogoApisHandler.getInstance() - .getApis().getMapServiceApi() - .getSingletonLocationClient(getApp()) - .getLastKnowLocation(); - HttpDnsSimpleLocation httpDnsSimpleLocation; - if (mogoLocation != null - && mogoLocation.getLatitude() != 0 - && mogoLocation.getLongitude() != 0) { + clientConfig.setIHttpDnsCurrentLocation(() -> { + MogoLocation mogoLocation = + MogoApisHandler.getInstance() + .getApis().getMapServiceApi() + .getSingletonLocationClient(getApp()) + .getLastKnowLocation(); + HttpDnsSimpleLocation httpDnsSimpleLocation; + if (mogoLocation != null + && mogoLocation.getLatitude() != 0 + && mogoLocation.getLongitude() != 0) { + httpDnsSimpleLocation = new HttpDnsSimpleLocation( + mogoLocation.getCityCode(), + mogoLocation.getLatitude(), + mogoLocation.getLongitude()); + Logger.i(TAG, "使用实时GPS信息:" + httpDnsSimpleLocation); + } else { + String ciyCode = SharedPrefsMgr.getInstance(getApp()) + .getString(SharedPrefsConstants.LOCATION_CITY_CODE); + String latitude = SharedPrefsMgr.getInstance(getApp()) + .getString(SharedPrefsConstants.LOCATION_LATITUDE); + String longitude = SharedPrefsMgr.getInstance(getApp()) + .getString(SharedPrefsConstants.LOCATION_LONGITUDE); + try { httpDnsSimpleLocation = new HttpDnsSimpleLocation( - mogoLocation.getCityCode(), - mogoLocation.getLatitude(), - mogoLocation.getLongitude()); - Logger.i(TAG, "使用实时GPS信息:" + httpDnsSimpleLocation); - } else { - String ciyCode = SharedPrefsMgr.getInstance(getApp()) - .getString(SharedPrefsConstants.LOCATION_CITY_CODE); - String latitude = SharedPrefsMgr.getInstance(getApp()) - .getString(SharedPrefsConstants.LOCATION_LATITUDE); - String longitude = SharedPrefsMgr.getInstance(getApp()) - .getString(SharedPrefsConstants.LOCATION_LONGITUDE); - try { - httpDnsSimpleLocation = new HttpDnsSimpleLocation( - ciyCode, - Double.parseDouble(latitude), - Double.parseDouble(longitude)); - } catch (NumberFormatException e) { - e.printStackTrace(); - httpDnsSimpleLocation = new HttpDnsSimpleLocation("010", 1, 1); - } - Logger.i(TAG, "使用缓存GPS信息:" + httpDnsSimpleLocation); + ciyCode, + Double.parseDouble(latitude), + Double.parseDouble(longitude)); + } catch (NumberFormatException e) { + e.printStackTrace(); + httpDnsSimpleLocation = new HttpDnsSimpleLocation("010", 1, 1); } - return httpDnsSimpleLocation; + Logger.i(TAG, "使用缓存GPS信息:" + httpDnsSimpleLocation); } + return httpDnsSimpleLocation; }); // 初始化SDK,可以设置状态回调来监听 @@ -257,7 +254,7 @@ public class MogoApplication extends AbsMogoApplication { } } - private void prepareSocketAndLocationServices() { + private void startSocketService() { IMogoServiceApis apis = MogoApisHandler.getInstance().getApis(); // 关闭长链服务 apis.getSocketManagerApi(getApplicationContext()).destroy(); @@ -268,7 +265,7 @@ public class MogoApplication extends AbsMogoApplication { @Override protected void socketTTL() { // 鉴权成功后开启socket长链服务 - prepareSocketAndLocationServices(); + startSocketService(); } private void initModules() { 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 31b9cbde57..adac9bd7db 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,33 +347,34 @@ public class AMapViewWrapper implements IMogoMapView, if (ui == null) { return; } + // TODO 这里临时修改关闭2D Logger.d(TAG, "设置的样式 = %s", ui); if (checkAMapView()) { switch (ui) { - case CarUp_2D: - case CarUp_3D: - case NorthUP_2D: - setUIMode(ui); - break; +// case CarUp_2D: +// case CarUp_3D: +// case NorthUP_2D: +// setUIMode(ui); +// break; case Type_VR: if (DebugConfig.getCarMachineType() == DebugConfig.CAR_MACHINE_TYPE_LENOVO) { 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); - mIsLightStyle = true; - break; - case Type_Night: - mMapView.getMapAutoViewHelper().setAutoSwitchStyle(false); - mMapView.getMapAutoViewHelper().setMapStyle(MapAutoApi.MAP_STYLE_NIGHT); - mIsLightStyle = false; - break; - case Type_AUTO_LIGHT_Night: - mMapView.getMapAutoViewHelper().setAutoSwitchStyle(true); - break; +// case Type_Light: +// mMapView.getMapAutoViewHelper().setAutoSwitchStyle(false); +// mMapView.getMapAutoViewHelper().setMapStyle(MapAutoApi.MAP_STYLE_DAY); +// mIsLightStyle = true; +// break; +// case Type_Night: +// mMapView.getMapAutoViewHelper().setAutoSwitchStyle(false); +// mMapView.getMapAutoViewHelper().setMapStyle(MapAutoApi.MAP_STYLE_NIGHT); +// mIsLightStyle = false; +// break; +// case Type_AUTO_LIGHT_Night: +// mMapView.getMapAutoViewHelper().setAutoSwitchStyle(true); +// break; } } diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/AdasRecognizedResultDrawer.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/AdasRecognizedResultDrawer.java index 0e1b862d33..2078100a2d 100644 --- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/AdasRecognizedResultDrawer.java +++ b/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/AdasRecognizedResultDrawer.java @@ -284,17 +284,17 @@ class AdasRecognizedResultDrawer extends BaseDrawer { newAdasRecognizedMarkersCaches.put(uniqueKey, marker); - if (shouldShowSpeed(recognizedListResult.type)) { - Message msg = mRenderThreadHandler.obtainMessage(); - msg.obj = new SpeedData(marker - , recognizedListResult.speed - , recognizedListResult.uuid - , recognizedListResult.type - , recognizedListResult.heading - , MogoApisHandler.getInstance().getApis().getStatusManagerApi().isVrMode()); - msg.what = MSG_DISPLAY_SPEED; - msg.sendToTarget(); - } +// if (shouldShowSpeed(recognizedListResult.type)) { +// Message msg = mRenderThreadHandler.obtainMessage(); +// msg.obj = new SpeedData(marker +// , recognizedListResult.speed +// , recognizedListResult.uuid +// , recognizedListResult.type +// , recognizedListResult.heading +// , MogoApisHandler.getInstance().getApis().getStatusManagerApi().isVrMode()); +// msg.what = MSG_DISPLAY_SPEED; +// msg.sendToTarget(); +// } Log.d("ADAS数据延时", "render 刷新一台车 cost : " + TimeUnit.NANOSECONDS.toMillis((System.nanoTime() - start))); } diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/status/EnvStatusManager.java b/modules/mogo-module-service/src/main/java/com/mogo/module/service/status/EnvStatusManager.java index 7de0be8def..254c1587e0 100644 --- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/status/EnvStatusManager.java +++ b/modules/mogo-module-service/src/main/java/com/mogo/module/service/status/EnvStatusManager.java @@ -11,6 +11,7 @@ import android.view.Gravity; import android.view.ViewGroup; import android.widget.TextView; +import com.mogo.cloud.passport.MoGoAiCloudClientConfig; import com.mogo.commons.debug.DebugConfig; import com.mogo.map.uicontroller.EnumMapUI; import com.mogo.module.common.MogoApisHandler; @@ -81,6 +82,7 @@ public class EnvStatusManager { "网络状态", "App版本", "Map版本", + "SN", "HV状态", "RV状态" }; @@ -100,10 +102,12 @@ public class EnvStatusManager { if (!TextUtils.isEmpty(mapVersion)) { stringBuilder.append(mapVersion).append("\n"); } - } else if (i == 10) { + } else if(i == 10){ + stringBuilder.append(MoGoAiCloudClientConfig.getInstance().getSn()).append("\n"); + } else if (i == 11) { boolean isHv = SharedPrefsMgr.getInstance( mContext ).getBoolean("OBU_HV", false ); stringBuilder.append("true".equals(isHv) ? "已连接" : "未连接").append("\n"); - } else if (i == 11) { + } else if (i == 12) { boolean isRv = SharedPrefsMgr.getInstance( mContext ).getBoolean("OBU_RV", false ); stringBuilder.append("true".equals(isRv) ? "已连接" : "未连接").append("\n"); } else {