diff --git a/app/src/block/java/com/mogo/launcher/lancet/jank/spi/HookInvokerImpl.java b/app/src/block/java/com/mogo/launcher/lancet/jank/spi/HookInvokerImpl.java index d0649a14fd..660b2644ad 100644 --- a/app/src/block/java/com/mogo/launcher/lancet/jank/spi/HookInvokerImpl.java +++ b/app/src/block/java/com/mogo/launcher/lancet/jank/spi/HookInvokerImpl.java @@ -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) {} } diff --git a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/scenario/scene/road/V2XAiRoadEventMarker.kt b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/scenario/scene/road/V2XAiRoadEventMarker.kt index 87737bc785..2e046f3b22 100644 --- a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/scenario/scene/road/V2XAiRoadEventMarker.kt +++ b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/scenario/scene/road/V2XAiRoadEventMarker.kt @@ -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) diff --git a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/scenario/scene/road/V2XRoadEventMarker.java b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/scenario/scene/road/V2XRoadEventMarker.java index c04fe1fcb6..cc7636b7c1 100644 --- a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/scenario/scene/road/V2XRoadEventMarker.java +++ b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/scenario/scene/road/V2XRoadEventMarker.java @@ -53,13 +53,16 @@ public class V2XRoadEventMarker implements IV2XMarker { 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); diff --git a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/block/MoGoBlockProviderImpl.kt b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/block/MoGoBlockProviderImpl.kt index 0b42689163..2d83e258a5 100644 --- a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/block/MoGoBlockProviderImpl.kt +++ b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/block/MoGoBlockProviderImpl.kt @@ -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() + } } }) } diff --git a/core/mogo-core-res/src/main/res/raw/taxi_sanjiaopai.nt3d b/core/mogo-core-res/src/main/res/raw/taxi_sanjiaopai.nt3d index e6496783e0..8ab4409214 100644 Binary files a/core/mogo-core-res/src/main/res/raw/taxi_sanjiaopai.nt3d and b/core/mogo-core-res/src/main/res/raw/taxi_sanjiaopai.nt3d differ diff --git a/core/mogo-core-res/src/main/res/raw/taxi_sanjiaozui.nt3d b/core/mogo-core-res/src/main/res/raw/taxi_sanjiaozui.nt3d index 9c925b4dbd..9db52cc348 100644 Binary files a/core/mogo-core-res/src/main/res/raw/taxi_sanjiaozui.nt3d and b/core/mogo-core-res/src/main/res/raw/taxi_sanjiaozui.nt3d differ diff --git a/core/mogo-core-utils/src/main/java/com/mogo/eagle/core/utilcode/util/VLogUtils.kt b/core/mogo-core-utils/src/main/java/com/mogo/eagle/core/utilcode/util/VLogUtils.kt index 76db51ac95..b5dd7e3e54 100644 --- a/core/mogo-core-utils/src/main/java/com/mogo/eagle/core/utilcode/util/VLogUtils.kt +++ b/core/mogo-core-utils/src/main/java/com/mogo/eagle/core/utilcode/util/VLogUtils.kt @@ -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) + } + } } }