diff --git a/app/build.gradle b/app/build.gradle index 85cb519b80..e453b51bc8 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -248,7 +248,7 @@ android { // 车机类型,主要用于区分自研车机还是别人家的车机,自研车机类型为0 buildConfigField 'int', 'CAR_MACHINE_TYPE', '2' buildConfigField 'boolean', 'ROAD_EVENT_ANIMATED', 'true' - manifestPlaceholders = [AMAP_API_VALUE: rootProject.ext.android.fLauncherAmapApiValue,CHANNEL_VALUE: "f8xx"] + manifestPlaceholders = [AMAP_API_VALUE: rootProject.ext.android.fLauncherAmapApiValue,CHANNEL_VALUE: "fPadLenovo"] // 是否使用高德sdk自定义导航 buildConfigField 'boolean', 'USE_CUSTOM_NAVI', 'false' // 是否支持换肤 @@ -268,7 +268,7 @@ android { // 是否需要使用工控机的rtk定位 buildConfigField 'boolean', 'IS_USE_ADAS_RTK_LOCATION_INFO', 'true' } - // f系列-网约车-出租车 + // 衡阳-联想Pad-网约车-出租车 fPadLenovoOchTaxi { minSdkVersion rootProject.ext.android.minSdkVersionPadLenovo targetSdkVersion rootProject.ext.android.targetSdkVersionPadLenovo @@ -279,7 +279,7 @@ android { // 车机类型,主要用于区分自研车机还是别人家的车机,自研车机类型为0 buildConfigField 'int', 'CAR_MACHINE_TYPE', '2' buildConfigField 'boolean', 'ROAD_EVENT_ANIMATED', 'true' - manifestPlaceholders = [AMAP_API_VALUE: rootProject.ext.android.fLauncherAmapApiValue, CHANNEL_VALUE: "fochtaxi"] + manifestPlaceholders = [AMAP_API_VALUE: rootProject.ext.android.fLauncherAmapApiValue, CHANNEL_VALUE: "fPadLenovoOchTaxi"] // 是否使用高德sdk自定义导航 buildConfigField 'boolean', 'USE_CUSTOM_NAVI', 'false' // 是否支持换肤 @@ -299,7 +299,7 @@ android { // 是否需要使用工控机的rtk定位 buildConfigField 'boolean', 'IS_USE_ADAS_RTK_LOCATION_INFO', 'true' } - // f系列-网约车-小巴车 + // 衡阳-联想Pad-网约车-小巴车 fPadLenovoOchBus { minSdkVersion rootProject.ext.android.minSdkVersionPadLenovo targetSdkVersion rootProject.ext.android.targetSdkVersionPadLenovo @@ -310,7 +310,7 @@ android { // 车机类型,主要用于区分自研车机还是别人家的车机,自研车机类型为0 buildConfigField 'int', 'CAR_MACHINE_TYPE', '2' buildConfigField 'boolean', 'ROAD_EVENT_ANIMATED', 'true' - manifestPlaceholders = [AMAP_API_VALUE: rootProject.ext.android.fLauncherAmapApiValue,CHANNEL_VALUE: "fochbus"] + manifestPlaceholders = [AMAP_API_VALUE: rootProject.ext.android.fLauncherAmapApiValue,CHANNEL_VALUE: "fPadLenovoOchBus"] // 是否使用高德sdk自定义导航 buildConfigField 'boolean', 'USE_CUSTOM_NAVI', 'false' // 是否支持换肤 diff --git a/app/src/main/java/com/mogo/launcher/MogoApplication.java b/app/src/main/java/com/mogo/launcher/MogoApplication.java index b1f95be36b..a9f0f172b1 100644 --- a/app/src/main/java/com/mogo/launcher/MogoApplication.java +++ b/app/src/main/java/com/mogo/launcher/MogoApplication.java @@ -282,7 +282,7 @@ public class MogoApplication extends AbsMogoApplication { startService(intent); } - if (refWatcher != null){ + if (refWatcher == null){ refWatcher = LeakCanary.install(this); } diff --git a/foudations/mogo-utils/src/main/java/com/mogo/utils/AppUtils.java b/foudations/mogo-utils/src/main/java/com/mogo/utils/AppUtils.java index ef027bcaac..a28fa486dd 100644 --- a/foudations/mogo-utils/src/main/java/com/mogo/utils/AppUtils.java +++ b/foudations/mogo-utils/src/main/java/com/mogo/utils/AppUtils.java @@ -6,7 +6,9 @@ import android.content.Context; import android.content.pm.ApplicationInfo; import android.content.pm.PackageInfo; import android.content.pm.PackageManager; +import android.os.Bundle; import android.text.TextUtils; +import android.util.Log; import java.util.List; @@ -58,6 +60,25 @@ public class AppUtils { } } + private static final String MOGO_MAP_SDK_VERSION = "MAP_SDK_VERSION"; + + public static String getCustomMapSDKVersion(Context context){ + return getApplicationMetaValue(context,MOGO_MAP_SDK_VERSION); + } + + private static String getApplicationMetaValue(Context context,String metaName){ + try { + ApplicationInfo applicationInfo = context.getPackageManager().getApplicationInfo(context.getPackageName(),PackageManager.GET_META_DATA); + Bundle bundle = applicationInfo.metaData; + if (bundle != null){ + return bundle.getString(metaName); + } + } catch (PackageManager.NameNotFoundException e) { + e.printStackTrace(); + } + return ""; + } + public static boolean isAppForeground( Context context ) { if ( context != null ) { ActivityManager activityManager = ( ActivityManager ) context.getSystemService( Context.ACTIVITY_SERVICE ); diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/BaseDrawer.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/BaseDrawer.java index 58d286ab95..9625a3d9ec 100644 --- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/BaseDrawer.java +++ b/modules/mogo-module-common/src/main/java/com/mogo/module/common/drawer/BaseDrawer.java @@ -180,11 +180,9 @@ class BaseDrawer { AdasRecognizedType recognizedType = AdasRecognizedType.valueFrom(type); if (recognizedType == AdasRecognizedType.classIdCar) { return R.raw.othercar; - } else if (recognizedType == AdasRecognizedType.classIdTrafficBus - || recognizedType == AdasRecognizedType.classIdTrafficTruck) { + } else if (recognizedType == AdasRecognizedType.classIdTrafficBus) { return R.raw.bus; - } else if (recognizedType == AdasRecognizedType.classIdBicycle - || recognizedType == AdasRecognizedType.classIdMoto) { + } else if (recognizedType == AdasRecognizedType.classIdMoto) { return R.raw.motorbike; } else if (recognizedType == AdasRecognizedType.classIdStopLine) { return R.raw.stopline; @@ -192,6 +190,10 @@ class BaseDrawer { return R.raw.arraw; } else if (recognizedType == AdasRecognizedType.classIdUnKnow) { return R.raw.tache; + }else if(recognizedType == AdasRecognizedType.classIdBicycle){ + return R.raw.zixingche; + }else if(recognizedType == AdasRecognizedType.classIdTrafficTruck){ + return R.raw.kache; } return R.raw.people; } diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/V2XWarningEntity.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/V2XWarningEntity.java index 961ab2f5b8..82b9d9ff42 100644 --- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/V2XWarningEntity.java +++ b/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/V2XWarningEntity.java @@ -54,6 +54,7 @@ public class V2XWarningEntity implements Serializable { public long satelliteTime; //预警蒙层等展示时长 private long showTime; + //设计划线宽度与道路同宽 private float roadwidth; //自组字段 diff --git a/modules/mogo-module-common/src/main/res/raw/kache.n3d b/modules/mogo-module-common/src/main/res/raw/kache.n3d new file mode 100644 index 0000000000..4a5f519e2c Binary files /dev/null and b/modules/mogo-module-common/src/main/res/raw/kache.n3d differ diff --git a/modules/mogo-module-common/src/main/res/raw/zixingche.n3d b/modules/mogo-module-common/src/main/res/raw/zixingche.n3d new file mode 100644 index 0000000000..afee072bf7 Binary files /dev/null and b/modules/mogo-module-common/src/main/res/raw/zixingche.n3d differ diff --git a/modules/mogo-module-main/src/main/res/layout/module_main_activity_main.xml b/modules/mogo-module-main/src/main/res/layout/module_main_activity_main.xml index 5456d236a3..0c83ef1c77 100644 --- a/modules/mogo-module-main/src/main/res/layout/module_main_activity_main.xml +++ b/modules/mogo-module-main/src/main/res/layout/module_main_activity_main.xml @@ -65,7 +65,7 @@ android:id="@+id/warning_bottom" android:layout_width="match_parent" android:layout_height="@dimen/dp_390" - android:layout_marginTop="@dimen/dp_690" + android:layout_gravity="bottom" android:background="@drawable/module_main_warning_bkg_bottom" android:visibility="gone" /> diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/intent/MockIntentHandler.java b/modules/mogo-module-service/src/main/java/com/mogo/module/service/intent/MockIntentHandler.java index fd4cd234d2..02d412edb5 100644 --- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/intent/MockIntentHandler.java +++ b/modules/mogo-module-service/src/main/java/com/mogo/module/service/intent/MockIntentHandler.java @@ -77,9 +77,11 @@ public class MockIntentHandler implements IntentHandler { final int oper = intent.getIntExtra("oper", -1); switch (oper) { case 1: + // 展示自车位置 MarkerServiceHandler.getMapUIController().showMyLocation(intent.getBooleanExtra("status", true)); break; case 2: + // 发起求助 boolean status = intent.getBooleanExtra("status", false); MarkerServiceHandler.getMogoStatusManager().setSeekHelping(TAG, status); break; @@ -403,7 +405,6 @@ public class MockIntentHandler implements IntentHandler { .syncLocation2Map(null); break; case 40: - double[][] coors = new double[][]{{40.17511749267578, 116.74359130859375}, {40.20258331298828, 116.74071502685547}, {40.202598571777344, 116.74067687988281}, @@ -444,7 +445,6 @@ public class MockIntentHandler implements IntentHandler { {40.20254135131836, 116.74005889892578}, {40.20252990722656, 116.74007415771484}, {40.20254898071289, 116.74008178710938}, - {40.20254135131836, 116.74005889892578}, {40.20252227783203, 116.74006652832031}, {40.20254898071289, 116.74002838134766}, @@ -542,12 +542,8 @@ public class MockIntentHandler implements IntentHandler { .getMapUIController() .openVrMode(false); break; - case 46:// 模拟 自车周边数据 -// String json = "{\"allList\":[{\"type\":3,\"uuid\":\"10009-5152\",\"lat\":40.1990809296,\"lon\":116.7393252195,\"speed\":0.0,\"heading\":0.0,\"systemTime\":1614329151909,\"vehicleType\":0,\"distance\":576.0,\"fromType\":3,\"isOnline\":0},{\"type\":3,\"uuid\":\"10009-5161\",\"lat\":40.1990827227,\"lon\":116.739325826,\"speed\":0.0,\"heading\":0.0,\"systemTime\":1614329151909,\"vehicleType\":0,\"distance\":576.0,\"fromType\":3,\"isOnline\":0}],\"nearList\":[],\"time\":1614329152238}"; -// SnapshotSetDataDrawer.getInstance().renderSnapshotData(GsonUtil.objectFromJson(json, MogoSnapshotSetData.class)); //todo 需要重新模拟一个test数据 - break; - case 47:// 模拟鹰眼模式下绘制车辆周边的数据 - mTimeTickHandler.sendEmptyMessageDelayed(1, 0L); + case 46:// 模拟鹰眼模式下绘制车辆周边的数据 +// mTimeTickHandler.sendEmptyMessageDelayed(1, 0L); break; case 48:// 模拟3D模型绘制 MogoMarkerOptions options = new MogoMarkerOptions() @@ -603,8 +599,8 @@ public class MockIntentHandler implements IntentHandler { DebugConfig.setSelfCarSpeedYOffset(intent.getIntExtra("yOffset", 20)); break; case 51:// 模拟路口车辆移动 - mLocationMockHandler.sendEmptyMessageDelayed(100, 0L); - mLocationMockHandler.sendEmptyMessageDelayed(101, 1000L); +// mLocationMockHandler.sendEmptyMessageDelayed(100, 0L); +// mLocationMockHandler.sendEmptyMessageDelayed(101, 1000L); break; case 52: // 打开连调工控机、ADAS的控制面板 @@ -616,7 +612,7 @@ public class MockIntentHandler implements IntentHandler { DebugConfig.setUseAdasRecognize(isUseAdasRecognize); break; case 54: - mTimeTickCarHandler.sendEmptyMessageDelayed(1, 0L); +// mTimeTickCarHandler.sendEmptyMessageDelayed(1, 0L); break; case 55: //开启模拟数据Mock,用于验证算法准确性 diff --git a/test/crashreport-bugly/src/main/java/com/mogo/test/crashreport/bugly/BuglyCrashReportProvider.java b/test/crashreport-bugly/src/main/java/com/mogo/test/crashreport/bugly/BuglyCrashReportProvider.java index d285c6fb2e..d016bc43b1 100644 --- a/test/crashreport-bugly/src/main/java/com/mogo/test/crashreport/bugly/BuglyCrashReportProvider.java +++ b/test/crashreport-bugly/src/main/java/com/mogo/test/crashreport/bugly/BuglyCrashReportProvider.java @@ -11,6 +11,7 @@ import com.alibaba.android.arouter.facade.annotation.Route; import com.mogo.cloud.passport.MoGoAiCloudClientConfig; import com.mogo.test.crashreport.CrashReportConstants; import com.mogo.test.crashreport.ITestCrashReportProvider; +import com.mogo.utils.AppUtils; import com.mogo.utils.logger.Logger; import com.tencent.bugly.crashreport.CrashReport; @@ -31,7 +32,7 @@ class BuglyCrashReportProvider implements ITestCrashReportProvider { private static final String TAG = "BuglyCrashReportProvider"; @Override - public void init(final Context context ) { + public void init(Context context ) { Logger.d(TAG, "init"); String packageName = context.getPackageName(); String processName = getProcessName( android.os.Process.myPid() ); @@ -39,17 +40,8 @@ class BuglyCrashReportProvider implements ITestCrashReportProvider { strategy.setUploadProcess( processName == null || processName.equals( packageName ) ); CrashReport.initCrashReport( context, "f3f8b0b2f1", true, strategy ); CrashReport.putUserData( context, "serial", MoGoAiCloudClientConfig.getInstance().getSn() ); - try { - ApplicationInfo applicationInfo = context.getPackageManager().getApplicationInfo(context.getPackageName(),PackageManager.GET_META_DATA); - Bundle bundle = applicationInfo.metaData; - if (bundle != null){ - String sdkVersion = bundle.getString("MAP_SDK_VERSION"); - Log.e("lianglihui", "init: "+sdkVersion); - CrashReport.putUserData( context, "MAP_SDK_VERSION",bundle.getString("MAP_SDK_VERSION") ); - } - } catch (PackageManager.NameNotFoundException e) { - e.printStackTrace(); - } + String mapSDKVersion = AppUtils.getCustomMapSDKVersion(context); + CrashReport.putUserData( context, "MAP_SDK_VERSION",mapSDKVersion ); } /** diff --git a/test/crashreport-upgrade/src/main/java/com/mogo/test/crashreport/upgrade/UpgradeReportProvider.java b/test/crashreport-upgrade/src/main/java/com/mogo/test/crashreport/upgrade/UpgradeReportProvider.java index d510835ac5..579c6704cc 100644 --- a/test/crashreport-upgrade/src/main/java/com/mogo/test/crashreport/upgrade/UpgradeReportProvider.java +++ b/test/crashreport-upgrade/src/main/java/com/mogo/test/crashreport/upgrade/UpgradeReportProvider.java @@ -2,11 +2,13 @@ package com.mogo.test.crashreport.upgrade; import android.content.Context; import android.text.TextUtils; +import android.util.Log; import com.alibaba.android.arouter.facade.annotation.Route; import com.alibaba.android.arouter.facade.template.IProvider; import com.mogo.cloud.passport.MoGoAiCloudClientConfig; import com.mogo.commons.network.Utils; +import com.mogo.utils.AppUtils; import com.mogo.utils.logger.Logger; import com.tencent.bugly.Bugly; import com.tencent.bugly.crashreport.CrashReport; @@ -41,6 +43,8 @@ public class UpgradeReportProvider implements IProvider { CrashReport.putUserData(context, "serial", MoGoAiCloudClientConfig.getInstance().getSn()); Bugly.init(context, "f3f8b0b2f1", true, strategy); + String mapSDKVersion = AppUtils.getCustomMapSDKVersion(context); + CrashReport.putUserData( context, "MAP_SDK_VERSION",mapSDKVersion ); } /**