Merge branch 'dev_hengyang_base' into dev2_adas

This commit is contained in:
suyong
2021-06-15 17:55:58 +08:00
11 changed files with 50 additions and 34 deletions

View File

@@ -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'
// 是否支持换肤

View File

@@ -282,7 +282,7 @@ public class MogoApplication extends AbsMogoApplication {
startService(intent);
}
if (refWatcher != null){
if (refWatcher == null){
refWatcher = LeakCanary.install(this);
}

View File

@@ -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 );

View File

@@ -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;
}

View File

@@ -54,6 +54,7 @@ public class V2XWarningEntity implements Serializable {
public long satelliteTime;
//预警蒙层等展示时长
private long showTime;
//设计划线宽度与道路同宽
private float roadwidth;
//自组字段

Binary file not shown.

View File

@@ -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" />

View File

@@ -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用于验证算法准确性

View File

@@ -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 );
}
/**

View File

@@ -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 );
}
/**