Merge branch 'dev_arch_opt_3.0' of gitlab.zhidaoauto.com:zhjt/AndroidApp/MoGoEagleEye into dev_arch_opt_3.0
This commit is contained in:
@@ -158,6 +158,12 @@ android {
|
||||
storePassword 'ZDauto123456'
|
||||
keyPassword 'ZDauto123456'
|
||||
}
|
||||
releaseEB5 {
|
||||
keyAlias = 'android_platform'
|
||||
storeFile file('../keystore/EB5/car_launcher.jks')
|
||||
storePassword 'ZDauto123456'
|
||||
keyPassword 'ZDauto123456'
|
||||
}
|
||||
}
|
||||
buildTypes {
|
||||
debug {
|
||||
|
||||
@@ -62,7 +62,6 @@ dependencies {
|
||||
implementation rootProject.ext.dependencies.androidxroomktx
|
||||
|
||||
implementation project(':foudations:mogo-commons')
|
||||
implementation project(':core:mogo-core-data')
|
||||
implementation project(':core:mogo-core-utils')
|
||||
implementation project(':core:mogo-core-network')
|
||||
implementation project(':core:mogo-core-function-call')
|
||||
|
||||
@@ -61,13 +61,11 @@ dependencies {
|
||||
implementation rootProject.ext.dependencies.androidxrecyclerview
|
||||
|
||||
if (Boolean.valueOf(USE_MAVEN_PACKAGE)) {
|
||||
implementation rootProject.ext.dependencies.mogo_core_data
|
||||
implementation rootProject.ext.dependencies.mogo_core_utils
|
||||
implementation rootProject.ext.dependencies.mogo_core_function_call
|
||||
implementation rootProject.ext.dependencies.mogo_core_res
|
||||
} else {
|
||||
implementation project(':foudations:mogo-commons')
|
||||
implementation project(':core:mogo-core-data')
|
||||
implementation project(':core:mogo-core-utils')
|
||||
implementation project(':core:mogo-core-function-call')
|
||||
implementation project(':core:mogo-core-res')
|
||||
|
||||
@@ -60,17 +60,14 @@ dependencies {
|
||||
implementation rootProject.ext.dependencies.amapnavi3dmap
|
||||
|
||||
if (Boolean.valueOf(USE_MAVEN_PACKAGE)) {
|
||||
implementation rootProject.ext.dependencies.mogo_core_data
|
||||
implementation rootProject.ext.dependencies.mogo_core_utils
|
||||
implementation rootProject.ext.dependencies.mogo_core_function_call
|
||||
|
||||
implementation project(':libraries:mogo-adas')
|
||||
implementation rootProject.ext.dependencies.mogocommons
|
||||
} else {
|
||||
implementation project(':core:mogo-core-data')
|
||||
implementation project(':core:mogo-core-utils')
|
||||
implementation project(':core:mogo-core-function-call')
|
||||
|
||||
implementation project(':libraries:mogo-adas')
|
||||
implementation project(':foudations:mogo-commons')
|
||||
}
|
||||
|
||||
@@ -16,10 +16,7 @@ import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02Lis
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationWGS84ListenerManager
|
||||
import com.mogo.eagle.core.function.call.obu.CallerObuLocationWGS84ListenerManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr
|
||||
import com.mogo.eagle.core.utilcode.util.CoordinateTransform
|
||||
import com.mogo.eagle.core.utilcode.util.FileUtils
|
||||
import com.mogo.eagle.core.utilcode.util.TimeUtils
|
||||
import com.mogo.eagle.core.utilcode.util.Utils
|
||||
import com.mogo.eagle.core.utilcode.util.*
|
||||
import com.mogo.support.obu.model.MogoObuHvBasicsData
|
||||
import mogo.telematics.pad.MessagePad
|
||||
|
||||
|
||||
@@ -88,14 +88,11 @@ dependencies {
|
||||
if (Boolean.valueOf(USE_MAVEN_PACKAGE)) {
|
||||
implementation rootProject.ext.dependencies.mogo_core_utils
|
||||
implementation rootProject.ext.dependencies.mogo_core_function_call
|
||||
implementation rootProject.ext.dependencies.mogo_core_data
|
||||
implementation rootProject.ext.dependencies.mogo_core_res
|
||||
}else {
|
||||
implementation project(':foudations:mogo-aicloud-services-sdk')
|
||||
implementation project(':foudations:mogo-commons')
|
||||
implementation project(':core:mogo-core-utils')
|
||||
implementation project(':core:mogo-core-function-call')
|
||||
implementation project(':core:mogo-core-data')
|
||||
implementation project(':core:mogo-core-res')
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,8 +82,6 @@ dependencies {
|
||||
compileOnly rootProject.ext.dependencies.mogocommons
|
||||
compileOnly rootProject.ext.dependencies.mogo_core_res
|
||||
compileOnly rootProject.ext.dependencies.mogo_core_utils
|
||||
compileOnly rootProject.ext.dependencies.mogo_core_function_map
|
||||
compileOnly rootProject.ext.dependencies.mogo_core_function_devatools
|
||||
compileOnly rootProject.ext.dependencies.mogo_core_function_datacenter
|
||||
compileOnly rootProject.ext.dependencies.mogo_core_function_call
|
||||
compileOnly project(':libraries:mogo-adas')
|
||||
|
||||
@@ -75,13 +75,10 @@ dependencies {
|
||||
implementation rootProject.ext.dependencies.mogo_core_function_call
|
||||
|
||||
implementation rootProject.ext.dependencies.mogomap
|
||||
implementation rootProject.ext.dependencies.mogomapapi
|
||||
} else {
|
||||
implementation project(':foudations:mogo-commons')
|
||||
implementation project(':core:mogo-core-res')
|
||||
implementation project(':core:mogo-core-data')
|
||||
implementation project(':core:mogo-core-utils')
|
||||
implementation project(':core:function-impl:mogo-core-function-datacenter')
|
||||
implementation project(':core:mogo-core-function-call')
|
||||
implementation project(":libraries:mogo-map")
|
||||
}
|
||||
|
||||
@@ -55,8 +55,8 @@ public class TrackObj {
|
||||
}
|
||||
|
||||
private void correct() {
|
||||
// calAverageSpeedAndType();
|
||||
// calLoc();
|
||||
calAverageSpeedAndType();
|
||||
calLoc();
|
||||
// calHeading();
|
||||
}
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ public class MogoMapService implements IMogoMapService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMogoOverlayManager getOverlayManager(Context context) {
|
||||
public IMogoOverlayManager getOverlayManager() {
|
||||
return MogoOverlayManager.getInstance();
|
||||
}
|
||||
|
||||
|
||||
@@ -40,32 +40,20 @@ android {
|
||||
dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
implementation rootProject.ext.dependencies.androidxccorektx
|
||||
implementation rootProject.ext.dependencies.androidxappcompat
|
||||
implementation rootProject.ext.dependencies.arouter
|
||||
implementation project(path: ':foudations:mogo-commons')
|
||||
kapt rootProject.ext.dependencies.aroutercompiler
|
||||
|
||||
implementation rootProject.ext.dependencies.android_start_up
|
||||
implementation rootProject.ext.dependencies.mogocustommap
|
||||
implementation rootProject.ext.dependencies.thread_opt
|
||||
|
||||
if (Boolean.valueOf(USE_MAVEN_PACKAGE)) {
|
||||
implementation rootProject.ext.dependencies.mogo_core_res
|
||||
implementation rootProject.ext.dependencies.mogo_core_data
|
||||
implementation rootProject.ext.dependencies.mogo_core_utils
|
||||
implementation rootProject.ext.dependencies.mogo_core_function_api
|
||||
implementation rootProject.ext.dependencies.mogo_core_function_call
|
||||
implementation rootProject.ext.dependencies.crashreport
|
||||
implementation rootProject.ext.dependencies.mogomap
|
||||
implementation rootProject.ext.dependencies.mogomapapi
|
||||
} else {
|
||||
implementation project(':core:mogo-core-res')
|
||||
implementation project(':core:mogo-core-data')
|
||||
implementation project(':core:mogo-core-utils')
|
||||
implementation project(':core:mogo-core-function-api')
|
||||
implementation project(':core:mogo-core-function-call')
|
||||
implementation project(":test:crashreport")
|
||||
implementation project(':libraries:mogo-map')
|
||||
implementation project(":libraries:mogo-map-api")
|
||||
}
|
||||
implementation project(':foudations:mogo-commons')
|
||||
}
|
||||
|
||||
apply from: new File(rootProject.rootDir, "gradle/upload.gradle").toString()
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
/**
|
||||
* Automatically generated file. DO NOT MODIFY
|
||||
*/
|
||||
package com.mogo.eagle.core.function.startup;
|
||||
|
||||
public final class BuildConfig {
|
||||
public static final boolean DEBUG = Boolean.parseBoolean("true");
|
||||
public static final String LIBRARY_PACKAGE_NAME = "com.mogo.eagle.core.function.startup";
|
||||
/**
|
||||
* @deprecated APPLICATION_ID is misleading in libraries. For the library package name use LIBRARY_PACKAGE_NAME
|
||||
*/
|
||||
@Deprecated
|
||||
public static final String APPLICATION_ID = "com.mogo.eagle.core.function.startup";
|
||||
public static final String BUILD_TYPE = "debug";
|
||||
public static final String FLAVOR = "";
|
||||
public static final int VERSION_CODE = 1;
|
||||
public static final String VERSION_NAME = "";
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
package com.alibaba.android.arouter.routes;
|
||||
|
||||
import com.alibaba.android.arouter.facade.enums.RouteType;
|
||||
import com.alibaba.android.arouter.facade.model.RouteMeta;
|
||||
import com.alibaba.android.arouter.facade.template.IRouteGroup;
|
||||
import com.mogo.eagle.core.function.startup.MogoStartUpProvider;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* DO NOT EDIT THIS FILE!!! IT WAS GENERATED BY AROUTER. */
|
||||
public class ARouter$$Group$$start_up implements IRouteGroup {
|
||||
@Override
|
||||
public void loadInto(Map<String, RouteMeta> atlas) {
|
||||
atlas.put("/start_up/api", RouteMeta.build(RouteType.PROVIDER, MogoStartUpProvider.class, "/start_up/api", "start_up", null, -1, -2147483648));
|
||||
}
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
package com.alibaba.android.arouter.routes;
|
||||
|
||||
import com.alibaba.android.arouter.facade.enums.RouteType;
|
||||
import com.alibaba.android.arouter.facade.model.RouteMeta;
|
||||
import com.alibaba.android.arouter.facade.template.IProviderGroup;
|
||||
import com.mogo.eagle.core.function.startup.MogoStartUpProvider;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* DO NOT EDIT THIS FILE!!! IT WAS GENERATED BY AROUTER. */
|
||||
public class ARouter$$Providers$$mogocorefunctionstartup implements IProviderGroup {
|
||||
@Override
|
||||
public void loadInto(Map<String, RouteMeta> providers) {
|
||||
providers.put("com.mogo.eagle.core.function.api.startup.IStartUpProvider", RouteMeta.build(RouteType.PROVIDER, MogoStartUpProvider.class, "/start_up/api", "start_up", null, -1, -2147483648));
|
||||
}
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
package com.alibaba.android.arouter.routes;
|
||||
|
||||
import com.alibaba.android.arouter.facade.template.IRouteGroup;
|
||||
import com.alibaba.android.arouter.facade.template.IRouteRoot;
|
||||
import java.lang.Class;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* DO NOT EDIT THIS FILE!!! IT WAS GENERATED BY AROUTER. */
|
||||
public class ARouter$$Root$$mogocorefunctionstartup implements IRouteRoot {
|
||||
@Override
|
||||
public void loadInto(Map<String, Class<? extends IRouteGroup>> routes) {
|
||||
routes.put("start_up", ARouter$$Group$$start_up.class);
|
||||
}
|
||||
}
|
||||
@@ -62,7 +62,6 @@ dependencies {
|
||||
implementation rootProject.ext.dependencies.localbroadcastmanager
|
||||
implementation rootProject.ext.dependencies.arouter
|
||||
implementation rootProject.ext.dependencies.rxandroid
|
||||
implementation rootProject.ext.dependencies.flexbox
|
||||
kapt rootProject.ext.dependencies.aroutercompiler
|
||||
implementation rootProject.ext.dependencies.protobuf_java
|
||||
implementation rootProject.ext.dependencies.protobuf_java_util
|
||||
@@ -71,19 +70,14 @@ dependencies {
|
||||
|
||||
if (Boolean.valueOf(USE_MAVEN_PACKAGE)) {
|
||||
implementation rootProject.ext.dependencies.mogocommons
|
||||
implementation rootProject.ext.dependencies.mogo_core_data
|
||||
implementation rootProject.ext.dependencies.mogo_core_utils
|
||||
implementation rootProject.ext.dependencies.mogo_core_function_call
|
||||
implementation rootProject.ext.dependencies.mogo_core_res
|
||||
compileOnly rootProject.ext.dependencies.mogomap
|
||||
} else {
|
||||
implementation project(":foudations:mogo-commons")
|
||||
implementation project(':core:mogo-core-data')
|
||||
implementation project(':core:mogo-core-utils')
|
||||
implementation project(':core:mogo-core-function-call')
|
||||
implementation project(':core:mogo-core-res')
|
||||
implementation project(':libraries:mogo-adas')
|
||||
compileOnly project(':libraries:mogo-map')
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ public class V2XAlarmServer {
|
||||
CopyOnWriteArrayList<V2XRoadEventEntity> v2XRoadEventEntityList,
|
||||
MogoLocation currentLocation) {
|
||||
try {
|
||||
Logger.d(TAG, "getDriveFrontAlarmEvent --- 1 ---" + currentLocation );
|
||||
//Logger.d(TAG, "getDriveFrontAlarmEvent --- 1 ---" + currentLocation );
|
||||
if (!showedEvents.isEmpty()) {
|
||||
Iterator<V2XRoadEventEntity> iterator = showedEvents.iterator();
|
||||
while (iterator.hasNext()) {
|
||||
@@ -54,18 +54,18 @@ public class V2XAlarmServer {
|
||||
}
|
||||
}
|
||||
}
|
||||
Logger.d(TAG, "getDriveFrontAlarmEvent --- 2 ---" + currentLocation);
|
||||
//Logger.d(TAG, "getDriveFrontAlarmEvent --- 2 ---" + currentLocation);
|
||||
if (currentLocation != null && v2XRoadEventEntityList != null) {
|
||||
// 因为集合是按照距离排序后的所以这里检索出来第一个就发出警告
|
||||
for (V2XRoadEventEntity v2XRoadEventEntity : v2XRoadEventEntityList) {
|
||||
// 0、道路事件必须有朝向,角度>=0;
|
||||
Logger.d(TAG, "entity:" + v2XRoadEventEntity.getLocation());
|
||||
//Logger.d(TAG, "entity:" + v2XRoadEventEntity.getLocation());
|
||||
if (v2XRoadEventEntity.getLocation().getAngle() >= 0) {
|
||||
// 计算车辆距离指定气泡的距离
|
||||
MarkerLocation eventLocation = v2XRoadEventEntity.getLocation();
|
||||
// 1、判断是否到达了触发距离,20 ~ 500,
|
||||
double distance = v2XRoadEventEntity.getDistance();
|
||||
Logger.d(TAG, "distance:" + distance);
|
||||
//Logger.d(TAG, "distance:" + distance);
|
||||
if (distance <= 500) {
|
||||
if (EventTypeEnumNew.GHOST_PROBE.getPoiType().equals(v2XRoadEventEntity.getPoiType())) {
|
||||
if (distance > 25) {
|
||||
@@ -76,7 +76,7 @@ public class V2XAlarmServer {
|
||||
double carBearing = currentLocation.getHeading();
|
||||
double eventBearing = eventLocation.getAngle();
|
||||
double diffAngle = DrivingDirectionUtils.getAngleDiff(carBearing, eventBearing);
|
||||
Logger.d(TAG, "car_bearing:" + carBearing + ",eventBearing:" + eventBearing + ",diffAngle:" + diffAngle);
|
||||
//Logger.d(TAG, "car_bearing:" + carBearing + ",eventBearing:" + eventBearing + ",diffAngle:" + diffAngle);
|
||||
if (diffAngle <= 20) {
|
||||
// 3、计算当前车辆行驶方向与事件位置之间夹角《20度,保证道路事件在车辆前方
|
||||
double eventAngle = DrivingDirectionUtils.getDegreeOfCar2Poi(
|
||||
@@ -87,12 +87,12 @@ public class V2XAlarmServer {
|
||||
(int) currentLocation.getHeading()
|
||||
);
|
||||
|
||||
Logger.d(TAG, "eventAngle:" + eventAngle);
|
||||
//Logger.d(TAG, "eventAngle:" + eventAngle);
|
||||
if (0 <= eventAngle && eventAngle <= 20) {
|
||||
if (showedEvents.contains(v2XRoadEventEntity)) {
|
||||
return null;
|
||||
}
|
||||
Logger.d(TAG, "showed---");
|
||||
//Logger.d(TAG, "showed---");
|
||||
showedEvents.add(v2XRoadEventEntity);
|
||||
return v2XRoadEventEntity;
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ public class MoGoPersonWarnPolylineManager implements IMoGoPersonWarnPolylineMan
|
||||
options.add(locations.get(i));
|
||||
}
|
||||
// 绘制线的对象
|
||||
IMogoOverlayManager overlay = CallerMapUIServiceManager.INSTANCE.getOverlayManager(AbsMogoApplication.getApp());
|
||||
IMogoOverlayManager overlay = CallerMapUIServiceManager.INSTANCE.getOverlayManager();
|
||||
if (overlay != null) {
|
||||
mMogoPolyline = overlay.addPolyline(options);
|
||||
mMogoPolyline.setTransparency(0.5f);
|
||||
|
||||
@@ -54,7 +54,7 @@ public class MoGoStopPolylineManager implements IMoGoStopPolylineManager {
|
||||
options.add(locations.get(i));
|
||||
}
|
||||
// 绘制线的对象
|
||||
IMogoOverlayManager overlay = CallerMapUIServiceManager.INSTANCE.getOverlayManager(AbsMogoApplication.getApp());
|
||||
IMogoOverlayManager overlay = CallerMapUIServiceManager.INSTANCE.getOverlayManager();
|
||||
if (overlay != null) {
|
||||
mMogoPolyline = overlay.addPolyline(options);
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ public class MoGoWarnPolylineManager implements IMoGoWarnPolylineManager {
|
||||
}
|
||||
// 绘制线的对象
|
||||
|
||||
IMogoOverlayManager overlay = CallerMapUIServiceManager.INSTANCE.getOverlayManager(AbsMogoApplication.getApp());
|
||||
IMogoOverlayManager overlay = CallerMapUIServiceManager.INSTANCE.getOverlayManager();
|
||||
if (overlay != null) {
|
||||
mMogoPolyline = overlay.addPolyline(options);
|
||||
}
|
||||
|
||||
@@ -39,9 +39,7 @@ class AiRoadMarker {
|
||||
private val marker by lazy { AtomicReference<Marker>() }
|
||||
|
||||
private val overlayManager by lazy {
|
||||
CallerMapUIServiceManager.getOverlayManager(
|
||||
AbsMogoApplication.getApp()
|
||||
)
|
||||
CallerMapUIServiceManager.getOverlayManager()
|
||||
}
|
||||
|
||||
private val START_COLOR = Color.parseColor("#002ABAD9")
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
package com.mogo.eagle.core.function.v2x.events.scenario.scene.road
|
||||
|
||||
import android.graphics.*
|
||||
import android.graphics.Color
|
||||
import com.mogo.eagle.core.data.enums.EventTypeEnumNew
|
||||
import com.mogo.eagle.core.data.map.*
|
||||
import com.mogo.eagle.core.data.map.MogoLatLng
|
||||
import com.mogo.eagle.core.data.map.MogoLocation
|
||||
import com.mogo.eagle.core.data.map.entity.V2XRoadEventEntity
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
|
||||
import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi.context
|
||||
import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi.v2xMarker
|
||||
import com.mogo.eagle.core.function.v2x.events.remove.MarkerWrapper
|
||||
import com.mogo.map.*
|
||||
import com.mogo.map.marker.*
|
||||
import com.mogo.map.overlay.*
|
||||
import java.util.concurrent.atomic.*
|
||||
import kotlin.Pair
|
||||
import kotlin.collections.ArrayList
|
||||
import com.mogo.map.marker.IMogoMarker
|
||||
import com.mogo.map.overlay.IMogoPolyline
|
||||
import com.mogo.map.overlay.MogoPolylineOptions
|
||||
import java.util.concurrent.atomic.AtomicReference
|
||||
|
||||
class V2XAiRoadEventMarker {
|
||||
|
||||
@@ -20,7 +20,7 @@ class V2XAiRoadEventMarker {
|
||||
|
||||
private val v2xLocation = AtomicReference<MogoLocation>()
|
||||
|
||||
private val overlayManager by lazy { MogoOverlayManager.getInstance() }
|
||||
private val overlayManager by lazy { CallerMapUIServiceManager.getOverlayManager() }
|
||||
|
||||
fun drawMarkers(entity: V2XRoadEventEntity, wrapper: MarkerWrapper) {
|
||||
val extra = entity.noveltyInfo.extras["polygon"]
|
||||
@@ -68,9 +68,9 @@ class V2XAiRoadEventMarker {
|
||||
options.width(5f)
|
||||
options.zIndex(75000f)
|
||||
options.maxIndex(800000f)
|
||||
val line = overlayManager.addPolyline(options)
|
||||
current.set(Pair(line, wrapper.markers))
|
||||
if (line != null) {
|
||||
val line = overlayManager?.addPolyline(options)
|
||||
line?.let {
|
||||
current.set(Pair(line, wrapper.markers))
|
||||
line.isVisible = true
|
||||
wrapper.addLine(line)
|
||||
}
|
||||
|
||||
@@ -209,7 +209,7 @@ object V2XManager {
|
||||
if (!started.get()) {
|
||||
return
|
||||
}
|
||||
V2XLogger.d(TAG, "--- onLocationChanged --[longitude: $longitude, latitude: $latitude]")
|
||||
//V2XLogger.d(TAG, "--- onLocationChanged --[longitude: $longitude, latitude: $latitude]")
|
||||
realLongitude.set(longitude)
|
||||
realLatitude.set(latitude)
|
||||
val oldLon = lastLongitude.get()
|
||||
|
||||
@@ -40,10 +40,9 @@ public interface IMogoMapService extends IProvider {
|
||||
/**
|
||||
* 覆盖物操作
|
||||
*
|
||||
* @param context
|
||||
* @return
|
||||
*/
|
||||
IMogoOverlayManager getOverlayManager(Context context);
|
||||
IMogoOverlayManager getOverlayManager();
|
||||
|
||||
/**
|
||||
* 获取高德定位服务
|
||||
|
||||
@@ -59,11 +59,10 @@ dependencies {
|
||||
implementation rootProject.ext.dependencies.mogo_core_utils
|
||||
implementation rootProject.ext.dependencies.mogocommons
|
||||
} else {
|
||||
implementation project(':core:mogo-core-utils')
|
||||
implementation project(':foudations:mogo-commons')
|
||||
implementation project(':libraries:mogo-adas')
|
||||
api project(':libraries:mogo-map-api')
|
||||
implementation project(':foudations:mogo-commons')
|
||||
implementation project(':core:mogo-core-data')
|
||||
implementation project(':core:mogo-core-utils')
|
||||
api project(':core:mogo-core-function-api')
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,8 +30,8 @@ object CallerMapUIServiceManager {
|
||||
return serviceProvider?.markerService
|
||||
}
|
||||
|
||||
fun getOverlayManager(context: Context): IMogoOverlayManager?{
|
||||
return serviceProvider?.getOverlayManager(context)
|
||||
fun getOverlayManager(): IMogoOverlayManager?{
|
||||
return serviceProvider?.overlayManager
|
||||
}
|
||||
|
||||
fun getGDLocationServer(context: Context):IMogoGDLocationClient?{
|
||||
|
||||
@@ -15,26 +15,26 @@ import java.lang.reflect.Method;
|
||||
public class DevicesUtils {
|
||||
|
||||
private static final String PROPERTIES = "android.os.SystemProperties";
|
||||
private static final String GSM_SERIAL = "gsm.serial";
|
||||
private static final String GSM_SERIAL = "persist.device.sn";
|
||||
private static final String GET = "get";
|
||||
|
||||
public static String getSn(){
|
||||
public static String getSn() {
|
||||
return getSystemProperties(GSM_SERIAL);
|
||||
}
|
||||
|
||||
public static String getSystemProperties(String name ) {
|
||||
public static String getSystemProperties(String name) {
|
||||
String value = "";
|
||||
try {
|
||||
Class< ? > c = Class.forName( PROPERTIES );
|
||||
Method get = c.getMethod( GET, String.class );
|
||||
value = (String) get.invoke( c, name );
|
||||
} catch ( ClassNotFoundException var3 ) {
|
||||
Class<?> c = Class.forName(PROPERTIES);
|
||||
Method get = c.getMethod(GET, String.class);
|
||||
value = (String) get.invoke(c, name);
|
||||
} catch (ClassNotFoundException var3) {
|
||||
var3.printStackTrace();
|
||||
} catch ( NoSuchMethodException var4 ) {
|
||||
} catch (NoSuchMethodException var4) {
|
||||
var4.printStackTrace();
|
||||
} catch ( InvocationTargetException var5 ) {
|
||||
} catch (InvocationTargetException var5) {
|
||||
var5.printStackTrace();
|
||||
} catch ( IllegalAccessException var6 ) {
|
||||
} catch (IllegalAccessException var6) {
|
||||
var6.printStackTrace();
|
||||
}
|
||||
return value;
|
||||
|
||||
@@ -8,7 +8,6 @@ import android.os.Build;
|
||||
import android.telephony.TelephonyManager;
|
||||
import android.text.TextUtils;
|
||||
|
||||
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
@@ -154,6 +153,10 @@ public class TelephoneUtil {
|
||||
if (TextUtils.isEmpty(serial)) {
|
||||
serial = (String) get.invoke(c, "ro.serialno");
|
||||
}
|
||||
if (TextUtils.isEmpty(serial)) {
|
||||
serial = (String) get.invoke(c, "persist.device.sn");
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
@@ -17,11 +17,16 @@ import android.os.Build;
|
||||
import android.provider.Settings;
|
||||
import android.telephony.TelephonyManager;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.annotation.RequiresApi;
|
||||
import androidx.annotation.RequiresPermission;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.lang.reflect.Method;
|
||||
import java.net.InetAddress;
|
||||
import java.net.NetworkInterface;
|
||||
import java.net.SocketException;
|
||||
@@ -547,17 +552,85 @@ public final class DeviceUtils {
|
||||
|
||||
|
||||
/**
|
||||
* 中科创达 EB5获取SN好的方法:
|
||||
* getprop persist.device.sn
|
||||
* ZTS46S10009S
|
||||
* 获取设备SN的方法
|
||||
*
|
||||
* @return 当前EB5设备SN
|
||||
* @return 通过读取 getprop 的方式
|
||||
*/
|
||||
public static String getEB5DevicesSN() {
|
||||
ShellUtils.CommandResult result = UtilsBridge.execCmd("getprop persist.device.sn", false);
|
||||
if (result.result == 0) {
|
||||
LogUtils.d("", result.toString());
|
||||
public static String getSerialNumber() {
|
||||
String serial = "";
|
||||
try {
|
||||
Class<?> c = Class.forName("android.os.SystemProperties");
|
||||
Method get = c.getMethod("get", String.class);
|
||||
// 获取序列号,大多数机器在不root情况下获取不到
|
||||
serial = (String) get.invoke(c, "ro.serialno");
|
||||
if (TextUtils.isEmpty(serial)) {
|
||||
serial = (String) get.invoke(c, "ro.boot.serialno");
|
||||
}
|
||||
if (TextUtils.isEmpty(serial)) {
|
||||
// 分体机 SN
|
||||
serial = (String) get.invoke(c, "gsm.serial");
|
||||
}
|
||||
if (TextUtils.isEmpty(serial)) {
|
||||
// 中科创达 EB5获取SN
|
||||
serial = (String) get.invoke(c, "persist.device.sn");
|
||||
}
|
||||
if (TextUtils.isEmpty(serial)) {
|
||||
// 联想PAD 获取SN
|
||||
serial = (String) get.invoke(c, "ro.odm.lenovo.gsn");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return "02:00:00:00:00:00";
|
||||
return serial;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取 机器型号
|
||||
*
|
||||
* @return 机器型号
|
||||
*/
|
||||
public static String getProductModel() {
|
||||
String productModel = "null";
|
||||
try {
|
||||
Class<?> c = Class.forName("android.os.SystemProperties");
|
||||
Method get = c.getMethod("get", String.class);
|
||||
// 获取序列号,大多数机器在不root情况下获取不到
|
||||
productModel = (String) get.invoke(c, "ro.product.model");
|
||||
if (TextUtils.isEmpty(productModel)) {
|
||||
productModel = (String) get.invoke(c, "ro.product.odm.model");
|
||||
}
|
||||
if (TextUtils.isEmpty(productModel)) {
|
||||
productModel = (String) get.invoke(c, "ro.product.vendor.model");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return productModel;
|
||||
}
|
||||
|
||||
private static String getSerialnoNumbers() {
|
||||
final String serialnoStr = "[ro.boot.serialno]";
|
||||
try {
|
||||
Process p = Runtime.getRuntime().exec("getprop");
|
||||
p.waitFor();
|
||||
BufferedReader stdInput = new BufferedReader(new InputStreamReader(
|
||||
p.getInputStream()));
|
||||
String temp = "";
|
||||
while ((temp = stdInput.readLine()) != null) {
|
||||
Log.i("getSerialnoNumbers", temp);
|
||||
if (temp.contains(serialnoStr)) {
|
||||
temp.replaceAll(" ", "");
|
||||
int index = temp.indexOf(serialnoStr);
|
||||
temp = temp.substring(index + 20);
|
||||
temp = temp.substring(1, temp.length() - 1);
|
||||
Log.d("getSerialnoNumbers", temp);
|
||||
return temp;
|
||||
}
|
||||
}
|
||||
} catch (IOException | InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return serialnoStr;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.mogo.eagle.core.utilcode.util;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
/**
|
||||
* Android API从21后开始,不再直接支持通过SystemProperties.get/set方式来获取/设置系统属性。
|
||||
* 通过反射方式来进行系统属性操作,代码如下:
|
||||
*/
|
||||
public final class SystemPropertiesUtils {
|
||||
private static final String CLASS_NAME = "android.os.SystemProperties";
|
||||
|
||||
public static String getProperty(String key, String defaultValue) {
|
||||
String value = defaultValue;
|
||||
|
||||
try {
|
||||
Class<?> c = Class.forName(CLASS_NAME);
|
||||
Method get = c.getMethod("get", String.class, String.class);
|
||||
value = (String) (get.invoke(c, key, defaultValue));
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
|
||||
public static void setProperty(String key, String value) {
|
||||
try {
|
||||
Class<?> c = Class.forName(CLASS_NAME);
|
||||
Method set = c.getMethod("set", String.class, String.class);
|
||||
set.invoke(c, key, value);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
BIN
keystore/EB5/car_launcher.jks
Normal file
BIN
keystore/EB5/car_launcher.jks
Normal file
Binary file not shown.
28
keystore/EB5/key
Normal file
28
keystore/EB5/key
Normal file
@@ -0,0 +1,28 @@
|
||||
-----BEGIN PRIVATE KEY-----
|
||||
MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQCceAWSrA1dOBze
|
||||
qmXsyKYAbjZIDG1yB7EgEb5Qhjqr4rVdAJrfcUbW8iAigMfNTXvbJiQ7ioBsJrNL
|
||||
E3UjpJJoIkkE3AFJPnwKzxoFyHT2mwN7YDCdkHTSQoDha60qhzQ2GVHq9ypILQmy
|
||||
BLGHXhKsmMGqdz1oALnq/eVtWL7Y6NoW+aNgCZw3qDSm3+23trRKBJ4Homn8zyxU
|
||||
lvLPNtZN+Qo7jY80o7qrTPUzcasncZs7pYdUrQxT/BTh20XVHiNPu+k8m6Tt+c5U
|
||||
JhNQ7FNWB79pov9KoH219+ogDQmmwbSeIUAvie0RkIk6q1qRgPFS6C+FpFdTz1/B
|
||||
kHHF7sgnAgEDAoIBAGhQA7cdXj4laJRxmUiFxABJeYVdnkwFIMAL1DWu0cfseOir
|
||||
EepLhI9MFWxV2ojeUpIZbX0HAEgZzNy3o20YYZrBhgM9VjDUUrHfZq6Fo08SAlJA
|
||||
IGkK+IwsVeudHhxaIs67i/H6HDAeBnaty6+UDHMQgRxPfkVV0UdT7kjl1JCaMTTc
|
||||
hXxr+oGsH5d5EHCPBfEU4v8BqOBSEgkUFJ1Y6Y5AQqbSe2nSZ6bKZpE8YY27Ipvq
|
||||
BrZEN0j7SKcHKuJDm81DGfLrh3vOmW6U0ZWy7o9qv7INYXNDvtKUMQigXYYANKUp
|
||||
KvveUSgKJ+ixfFP8Ye92j8mp+d/+16i4Wa7Wu5sCgYEAyCd3wu4wsRAu/8q1abL1
|
||||
4/V8M95+dlfhJBl3H9VwUbsH+CP2VRQ9KYkaYdPwOb8hz1h8gqr74ASbEvz+ixMH
|
||||
zI6zel07VDCew+6OUZOBiOxGc8p7SpZuCeDsL+GEZxkOMQ7PXUpDI/p8nx84eEJU
|
||||
ZrHc2kv1VcpdAXLhtrpiicUCgYEAyCA3GDc282T3BXj061vqR2rpFaqhdlRy7S2B
|
||||
tA3BJj2Qrh1bgQGq9agC+YWm3xO3F/lJ+phK2WHoFOpR+m6w7Q0jx/L/BYOlJD+4
|
||||
h1zeZJKhLBQToodM1ZktcLGYFkSzNJeUImt5T1sErj5op9Ex97nZfYswCrl0GtGa
|
||||
NIVKJPsCgYEAhW+lLJ7LILV0qocjm8yj7U5SzT7++Y/rbWZPao5K4SdapW1O42LT
|
||||
cQYRlo1K0SoWijr9rHH9QAMSDKipsgyv3bR3pujSOCBp1/Re4Q0BBfLZoob83GRJ
|
||||
W+tIH+utmhC0ILSKPjGCF/xTFL96+tbi7yE95t1OOTGTVkyWedGXBoMCgYEAhWrP
|
||||
ZXokokNPWPtN8j1G2kdGDnHA+Y2h83OrzV6AxCkLHr49AKvHTnAB+65vP2J6D/uG
|
||||
pxAx5kFFY0bhUZ8gngjChUyqA60YwtUlr5M+7bcWHWK3wa+IjmYeSyEQDth3eGUN
|
||||
bEemNOdYdCmbGot2pSaQ/lzKsdD4EeEReFjcGKcCgYA+JeOt5WFENpv4LT+7P+j1
|
||||
k3xvOZ9sJGuXRXk9HXzsJvRCnc5oScwqku6i5HjzG8gyNVZg1sQGbVbWWmcNtaS8
|
||||
I3XalYAHYQyb8SGxlQP4ctKAN4j2Hbk1OHAMW84dfAQYQwFcBdaJTtMXQlbbX5Rh
|
||||
x90wE4qFuIapx6IKOmDxRw==
|
||||
-----END PRIVATE KEY-----
|
||||
BIN
keystore/EB5/p12
Normal file
BIN
keystore/EB5/p12
Normal file
Binary file not shown.
@@ -90,6 +90,15 @@ message Trajectory
|
||||
repeated TrajectoryPoint points = 1;
|
||||
}
|
||||
|
||||
enum AdditionalAttribute
|
||||
{
|
||||
ATTR_UNKNOWN = 0;
|
||||
ATTR_ZOMBIE = 1; // 僵尸车
|
||||
ATTR_ROAD_CONSTRUCTION = 2; // 道路施工区域
|
||||
ATTR_STATIC = 3; // 静止障碍物
|
||||
ATTR_ACCIDENT = 4; // 事故车
|
||||
}
|
||||
|
||||
// message definition for MsgTypeTrackedObjects
|
||||
message SubSource
|
||||
{
|
||||
@@ -125,6 +134,7 @@ message TrackedObject
|
||||
repeated TrackedSource tracked_source = 14;
|
||||
repeated Location polygon = 15;
|
||||
geometry.Point center = 16;
|
||||
AdditionalAttribute add_attribute = 17; // 事件类型
|
||||
}
|
||||
|
||||
message TrackedObjects
|
||||
@@ -178,7 +188,7 @@ message AutopilotState
|
||||
message PlanningObject
|
||||
{
|
||||
uint32 uuid = 1;
|
||||
uint32 type = 2; //影响自车决策的类型, 和感知的障碍物类型不是一回事 0是leading障碍物,1是避障和择机的障碍物
|
||||
uint32 type = 2; //影响自车决策的类型, 和感知的障碍物类型不是一回事
|
||||
}
|
||||
|
||||
message PlanningObjects
|
||||
|
||||
@@ -63,8 +63,6 @@ dependencies {
|
||||
implementation project(':core:mogo-core-utils')
|
||||
implementation project(':libraries:mogo-map-api')
|
||||
implementation project(':foudations:mogo-commons')
|
||||
|
||||
implementation project(':core:mogo-core-data')
|
||||
implementation project(':core:mogo-core-function-call') //todo 解除依赖
|
||||
}
|
||||
}
|
||||
|
||||
@@ -189,10 +189,10 @@ public class AMapViewWrapper implements IMogoMapView,
|
||||
public void onRoadIdInfo(@androidx.annotation.Nullable String roadId) {
|
||||
|
||||
if (roadId != null && !TextUtils.isEmpty(roadId)) {
|
||||
CallerLogger.INSTANCE.d(M_MAP + TAG, "onRoadIdInfo::" + roadId);
|
||||
// CallerLogger.INSTANCE.d(M_MAP + TAG, "onRoadIdInfo::" + roadId);
|
||||
CallerMapRoadListenerManager.INSTANCE.invokeListenersOnRoadIdGet(roadId);
|
||||
} else {
|
||||
CallerLogger.INSTANCE.d(M_MAP + TAG, "onRoadIdInfo::null");
|
||||
//CallerLogger.INSTANCE.d(M_MAP + TAG, "onRoadIdInfo::null");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -210,27 +210,27 @@ public class AMapViewWrapper implements IMogoMapView,
|
||||
* }
|
||||
*/
|
||||
String provider = carLoc.getProvider();
|
||||
CallerLogger.INSTANCE.d(M_MAP + TAG, "car_loc: " + carLoc + "");
|
||||
//CallerLogger.INSTANCE.d(M_MAP + TAG, "car_loc: " + carLoc + "");
|
||||
if (!MapAutoApi.GPS_FLAG.equals(provider)) {
|
||||
CallerLogger.INSTANCE.d(M_MAP + TAG, "convert before: car_loc: {lon: " + carLoc.getLongitude() + ", lat: " + carLoc.getLatitude() + "}");
|
||||
//CallerLogger.INSTANCE.d(M_MAP + TAG, "convert before: car_loc: {lon: " + carLoc.getLongitude() + ", lat: " + carLoc.getLatitude() + "}");
|
||||
LonLatPoint p = new LonLatPoint(carLoc.getLongitude(), carLoc.getLatitude());
|
||||
p = MapTools.INSTANCE.switchLonLatWGS84(p);
|
||||
carLoc.setLongitude(p.longitude);
|
||||
carLoc.setLatitude(p.latitude);
|
||||
CallerLogger.INSTANCE.d(M_MAP + TAG, "convert after: car_loc: {lon: " + carLoc.getLongitude() + ", lat: " + carLoc.getLatitude() + "}");
|
||||
//CallerLogger.INSTANCE.d(M_MAP + TAG, "convert after: car_loc: {lon: " + carLoc.getLongitude() + ", lat: " + carLoc.getLatitude() + "}");
|
||||
}
|
||||
CallerLogger.INSTANCE.d(M_MAP + TAG, "onStopLineInfo:stop_line" + stopLine + ", car_loc:{lon: " + carLoc.getLatitude() + ", lat: " + carLoc.getLongitude() + "}");
|
||||
//CallerLogger.INSTANCE.d(M_MAP + TAG, "onStopLineInfo:stop_line" + stopLine + ", car_loc:{lon: " + carLoc.getLatitude() + ", lat: " + carLoc.getLongitude() + "}");
|
||||
MapRoadInfo.StopLine stopInfo = convert(stopLine);
|
||||
LonLatPoint p1 = points.get(0);
|
||||
LonLatPoint p2 = points.get(points.size() - 1);
|
||||
double distanceOfCarToStopLine = MapDataApi.INSTANCE.getNearstFromPointToSegment(carLoc.getLongitude(), carLoc.getLatitude(), p1.longitude, p1.latitude, p2.longitude, p2.latitude) * 10_0000;
|
||||
stopInfo.setDistanceOfCarToStopLine(distanceOfCarToStopLine);
|
||||
CallerLogger.INSTANCE.d(M_MAP + TAG, "onStopLineInfo: --- distance: " + distanceOfCarToStopLine);
|
||||
//CallerLogger.INSTANCE.d(M_MAP + TAG, "onStopLineInfo: --- distance: " + distanceOfCarToStopLine);
|
||||
CallerMapRoadListenerManager.INSTANCE.invokeListenersOnStopLineGet(stopInfo);
|
||||
}
|
||||
} else {
|
||||
if (carLoc != null) {
|
||||
CallerLogger.INSTANCE.d(M_MAP + TAG, "onStopLineInfo::null, car_loc:{lon: " + carLoc.getLatitude() + ", lat: " + carLoc.getLongitude() + "}");
|
||||
//CallerLogger.INSTANCE.d(M_MAP + TAG, "onStopLineInfo::null, car_loc:{lon: " + carLoc.getLatitude() + ", lat: " + carLoc.getLongitude() + "}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user