diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/identify/IdentifyFactory.kt b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/identify/IdentifyFactory.kt index f96a7b84ad..409786fc79 100644 --- a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/identify/IdentifyFactory.kt +++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/identify/IdentifyFactory.kt @@ -5,8 +5,9 @@ import android.os.Message import com.mogo.eagle.core.data.config.FunctionBuildConfig import com.mogo.eagle.core.data.deva.chain.ChainConstant import com.mogo.eagle.core.data.traffic.TrafficData +import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotCarConfigListener import com.mogo.eagle.core.function.api.datacenter.obu.IMoGoObuStatusListener -import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfo +import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotCarConfigListenerManager import com.mogo.eagle.core.function.call.obu.CallerObuWarningListenerManager import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils.isTaxi import com.mogo.eagle.core.utilcode.mogo.thread.WorkThreadHandler @@ -16,7 +17,7 @@ import mogo.telematics.pad.MessagePad import mogo.telematics.pad.MessagePad.TrackedObject import mogo.yycp.api.proto.SocketDownData -object IdentifyFactory : Identify, IMoGoObuStatusListener { +object IdentifyFactory : Identify, IMoGoObuStatusListener, IMoGoAutopilotCarConfigListener { private const val TAG = "IdentifyFactory" @@ -35,8 +36,16 @@ object IdentifyFactory : Identify, IMoGoObuStatusListener { private var identify: Identify? = null private var aiCloudIdentify: Identify? = null - init { - val dockerVersion = getAutoPilotStatusInfo().dockVersion + fun initType(){ + drawType("默认开启感知优化,等待docker版本") + identify = UserIdentify.beautifyDataDrawer + aiCloudIdentify = AiIdentify.aiCloudDataDrawer + CallerAutopilotCarConfigListenerManager.addListener(TAG, this) + CallerObuWarningListenerManager.addListener(TAG, this) + } + + override fun onAutopilotCarConfig(carConfigResp: MessagePad.CarConfigResp) { + val dockerVersion = carConfigResp.dockVersion if (dockerVersion != null && dockerVersion.isNotEmpty()) { try { val version = ParseVersionUtils.parseVersion(true, dockerVersion) @@ -54,8 +63,6 @@ object IdentifyFactory : Identify, IMoGoObuStatusListener { identify = UserIdentify.beautifyDataDrawer } } - aiCloudIdentify = AiIdentify.aiCloudDataDrawer - CallerObuWarningListenerManager.addListener(TAG, this) } @ChainLog( @@ -182,4 +189,5 @@ object IdentifyFactory : Identify, IMoGoObuStatusListener { message.obj = trafficData mDrawerHandler.sendMessage(message) } + } \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/identify/MapIdentifySubscriber.kt b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/identify/MapIdentifySubscriber.kt index fb3d511096..44bc67a030 100644 --- a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/identify/MapIdentifySubscriber.kt +++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/identify/MapIdentifySubscriber.kt @@ -34,6 +34,7 @@ class MapIdentifySubscriber private constructor() : IMoGoSubscriber, } override fun onCrate() { + IdentifyFactory.initType() CallerAutopilotIdentifyListenerManager.addListener(TAG, this) CallerObuWarningListenerManager.addListener(TAG, this) }