diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/identify/IdentifyFactory.kt b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/identify/IdentifyFactory.kt index 997daa80ad..99959f1f4d 100644 --- a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/identify/IdentifyFactory.kt +++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/map/identify/IdentifyFactory.kt @@ -2,9 +2,7 @@ package com.mogo.eagle.core.function.map.identify import android.os.Handler import android.os.Message -import android.util.Log import com.mogo.eagle.core.data.config.FunctionBuildConfig -import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils import com.mogo.eagle.core.utilcode.mogo.thread.WorkThreadHandler import mogo.telematics.pad.MessagePad import mogo.telematics.pad.MessagePad.TrackedObject @@ -37,29 +35,31 @@ object IdentifyFactory : Identify { object : Handler(WorkThreadHandler.newInstance("IdentifyFactoryDrawer").looper) { override fun handleMessage(msg: Message) { super.handleMessage(msg) - if(!FunctionBuildConfig.isBeautyMode){ - if(identify is IdentifyBeautifyDataDrawer){ + if (!FunctionBuildConfig.isBeautyMode) { + // 非感知美化优化模式,清除旧数据,使用 DriverIdentify originDataDrawer 原始数据绘制 + if (identify is IdentifyBeautifyDataDrawer) { identify!!.clearOldMarker() identify = DriverIdentify.originDataDrawer } - }else{ - if(identify is IdentifyOriginDataDrawer){ + } else { + // 感知优化模式,清除旧数据,使用 UserIdentify beautifyDataDrawer 优化数据 + if (identify is IdentifyOriginDataDrawer) { identify!!.clearOldMarker() - identify = UserIdentify.beautifyDataDrawer + identify = UserIdentify.beautifyDataDrawer } } - when(msg.what){ + when (msg.what) { MSG_DATA_TRACK -> { - if(msg.obj is List<*>){ + if (msg.obj is List<*>) { identify!!.renderAdasRecognizedResult(msg.obj as List?) } } MSG_DATA_WARNING -> { - if(msg.obj is List<*>){ + if (msg.obj is List<*>) { identify!!.renderPlanningWarningObj(msg.obj as List?) } } - MSG_DATA_CLEAR ->{ + MSG_DATA_CLEAR -> { identify!!.clearOldMarker() } }