Merge remote-tracking branch 'origin/dev_robotaxi-d_231218_6.2.6' into dev_robotaxi-d_231218_6.2.6

This commit is contained in:
yangyakun
2023-12-28 11:14:26 +08:00
7 changed files with 62 additions and 46 deletions

View File

@@ -10,6 +10,7 @@ import com.mogo.eagle.core.function.api.devatools.block.IMoGoBlockProvider;
import com.mogo.eagle.core.function.api.devatools.perf.IMoGoCpuUsageProvider;
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager;
import com.mogo.eagle.core.function.main.ARouterUtils;
import com.mogo.eagle.core.utilcode.util.VLogUtils;
import com.zhjt.service.chain.ChainLog;
import java.util.concurrent.atomic.AtomicReference;
@@ -167,12 +168,7 @@ public class HookInvokerImpl implements IHookInvoker {
}
builder.setLength(builder.length() - 1);
}
String s = builder.toString();
//VLogUtils.w("HookHandler", "Junk Detected:" + builder, 4096);
linkedLog(type, builder.toString());
VLogUtils.w("HookHandler", builder.toString(), 4096);
if (flag) {
extra.setLength(0);
}
@@ -287,20 +283,4 @@ public class HookInvokerImpl implements IHookInvoker {
}
}
}
private void linkedLog(Type type, String msg) {
try {
linkedLogInternal(type,msg);
} catch (Throwable t) {
t.printStackTrace();
}
}
@ChainLog(
linkChainLog = ChainConstant.CHAIN_TYPE_ANR_LEAK,
linkCode = ChainConstant.CHAIN_SOURCE_HMI,
nodeAliasCode = ChainConstant.CHAIN_CODE_MAIN_BLOCK,
paramIndexes = { 0, 1 }
)
private void linkedLogInternal(Type type, String msg) {}
}

View File

@@ -3,15 +3,17 @@ package com.mogo.eagle.function.biz.v2x.v2n.scenario.scene.road
import android.graphics.Color
import com.mogo.eagle.core.data.config.FunctionBuildConfig
import com.mogo.eagle.core.data.enums.EventTypeEnumNew
import com.mogo.eagle.core.data.enums.EventTypeEnumNew.TYPE_SOCKET_ROAD_SHIGU
import com.mogo.eagle.core.data.map.MogoLatLng
import com.mogo.eagle.core.data.map.entity.V2XRoadEventEntity
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils.isTaxiPassenger
import com.mogo.eagle.function.biz.v2x.v2n.consts.V2XConst
import com.mogo.eagle.function.biz.v2x.v2n.remove.MarkerWrapper
import com.mogo.map.overlay.core.*
import com.mogo.map.overlay.line.*
import com.mogo.map.overlay.point.*
import com.mogo.map.overlay.core.Level
import com.mogo.map.overlay.line.Polyline
import com.mogo.map.overlay.point.Point
import java.util.concurrent.atomic.AtomicReference
class V2XAiRoadEventMarker {
@@ -20,15 +22,14 @@ class V2XAiRoadEventMarker {
fun drawMarkers(entity: V2XRoadEventEntity, wrapper: MarkerWrapper) {
val polygon = entity.noveltyInfo.polygon
val markerBuilder = Point.Options.Builder(V2XConst.V2X_MARKER_OWNER, Level.MAP_MARKER).longitude(entity.location.lon).latitude(entity.location.lat).scale(if (EventTypeEnumNew.TYPE_SOCKET_ROAD_SHIGU.poiType == entity.poiType && AppIdentityModeUtils.isTaxiPassenger(FunctionBuildConfig.appIdentityMode)) 0.6f else 1.0f).icon3DRes(EventTypeEnumNew.getMarker3DRes(entity.poiType)).set3DMode(true)
val isSpecial = TYPE_SOCKET_ROAD_SHIGU.poiType == entity.poiType && isTaxiPassenger(FunctionBuildConfig.appIdentityMode)
if (isSpecial) {
markerBuilder.controlAngle(true)
markerBuilder.rotate(-180f)
}
CallerMapUIServiceManager.getOverlayManager()?.showOrUpdatePoint(
Point.Options
.Builder(V2XConst.V2X_MARKER_OWNER, Level.MAP_MARKER)
.longitude(entity.location.lon)
.latitude(entity.location.lat)
.scale(if (EventTypeEnumNew.TYPE_SOCKET_ROAD_SHIGU.poiType == entity.poiType && AppIdentityModeUtils.isTaxiPassenger(
FunctionBuildConfig.appIdentityMode)) 0.6f else 1.0f)
.icon3DRes(EventTypeEnumNew.getMarker3DRes(entity.poiType))
.set3DMode(true)
markerBuilder
.build())?.also { wrapper.addPoint(it) }
if (polygon != null && polygon.isNotEmpty() && entity.poiType != EventTypeEnumNew.TYPE_SOCKET_ROAD_JINGZHI.poiType) {
val builder = Polyline.Options.Builder(V2XConst.V2X_MARKER_OWNER, Level.MAP_POLYGON)

View File

@@ -53,13 +53,16 @@ public class V2XRoadEventMarker implements IV2XMarker<V2XRoadEventEntity> {
AiRoadMarker.aiMakers.put(noveltyInfo.getInfoId(), aiMarker);
}
} else {
boolean isSpecial = EventTypeEnumNew.TYPE_SOCKET_ROAD_SHIGU.getPoiType().equals(entity.getPoiType()) && AppIdentityModeUtils.isTaxiPassenger(
FunctionBuildConfig.appIdentityMode);
Point point = overlayManager.showOrUpdatePoint(
new Point.Options.Builder(V2XConst.V2X_MARKER_OWNER, Level.MAP_MARKER)
.longitude(entity.getLocation().getLon())
.latitude(entity.getLocation().getLat())
.set3DMode(true)
.scale(EventTypeEnumNew.TYPE_SOCKET_ROAD_SHIGU.getPoiType().equals(entity.getPoiType()) && AppIdentityModeUtils.isTaxiPassenger(
FunctionBuildConfig.appIdentityMode) ? 0.6f : 1.0f)
.scale(isSpecial ? 0.6f : 1.0f)
.controlAngle(isSpecial)
.rotate(isSpecial ? 180 : 0)
.icon3DRes(EventTypeEnumNew.getMarker3DRes(entity.getPoiType())).build(),DEFAULT);
if (point != null) {
V2XBizTrace.Companion.onAck("V2XRoadEventMarker -> --- add Marker type: ", entity.getPoiType(), false);

View File

@@ -13,6 +13,7 @@ import com.mogo.eagle.core.block.runtime.report.*
import com.mogo.eagle.core.function.api.devatools.block.*
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
import com.mogo.eagle.core.utilcode.util.GsonUtils
import com.mogo.eagle.core.utilcode.util.VLogUtils
import java.util.concurrent.TimeUnit.SECONDS
internal class MoGoBlockProviderImpl: IMoGoBlockProvider, IBlockListener {
@@ -20,8 +21,6 @@ internal class MoGoBlockProviderImpl: IMoGoBlockProvider, IBlockListener {
@Volatile
private var hasInit = false
private val linkedLog by lazy { MainBlockLinkedLog() }
override fun init(ctx: Context) {
BlockDetector.init(BlockMetrics.Builder()
.context(ctx)
@@ -64,7 +63,11 @@ internal class MoGoBlockProviderImpl: IMoGoBlockProvider, IBlockListener {
}
}
}
linkedLog.record(GsonUtils.toJson(map))
try {
VLogUtils.w("BLOCK", GsonUtils.toJson(map))
} catch (t: Throwable) {
t.printStackTrace()
}
}
})
}

View File

@@ -1,5 +1,7 @@
package com.mogo.eagle.core.utilcode.util
import android.os.Handler
import android.os.HandlerThread
import android.util.Log
import com.apm.insight.log.VLog
@@ -7,31 +9,58 @@ class VLogUtils {
companion object {
private val handler by lazy {
HandlerThread("vlog_record").let {
it.start()
Handler(it.looper)
}
}
@JvmStatic
fun d(tag: String, msg: String, max: Int = 4096) {
handleMsg(msg, max).forEach {
VLog.d(tag, it)
val time = System.currentTimeMillis()
handler.post {
runCatching {
handleMsg("time:$time, msg:$msg", max).forEach {
VLog.d(tag, it)
}
}
}
}
@JvmStatic
fun v(tag: String, msg: String, max: Int = 4096) {
handleMsg(msg, max).forEach {
VLog.v(tag, it)
val time = System.currentTimeMillis()
handler.post {
runCatching {
handleMsg("time:$time, msg:$msg", max).forEach {
VLog.v(tag, it)
}
}
}
}
@JvmStatic
fun w(tag: String, msg: String, max: Int = 4096) {
handleMsg(msg, max).forEach {
VLog.w(tag, it)
val time = System.currentTimeMillis()
handler.post {
runCatching {
handleMsg("time:$time, msg:$msg", max).forEach {
VLog.w(tag, it)
}
}
}
}
@JvmStatic
fun e(tag: String, msg: String, max: Int = 4096) {
handleMsg(msg, max).forEach {
VLog.e(tag, it)
val time = System.currentTimeMillis()
handler.post {
runCatching {
handleMsg("time:$time, msg:$msg", max).forEach {
VLog.e(tag, it)
}
}
}
}