wait to test of fun config which adding the msgReceive
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package com.zhjt.mogo_core_function_devatools.funcconfig
|
||||
|
||||
import android.content.Context
|
||||
import android.util.Log
|
||||
import com.mogo.aicloud.services.socket.IMogoOnMessageListener
|
||||
import com.mogo.aicloud.services.socket.MogoAiCloudSocketManager
|
||||
import com.mogo.commons.AbsMogoApplication
|
||||
@@ -56,7 +57,7 @@ class FuncConfigCenter : IMogoOnMessageListener<FuncConfig>, IMoGoAutopilotCarCo
|
||||
refreshConfig(GsonUtils.fromJson(bizJson, FuncConfig::class.java))
|
||||
})
|
||||
}
|
||||
}else{
|
||||
} else {
|
||||
ToastUtils.showLong("未获取到域控mac信息")
|
||||
}
|
||||
}
|
||||
@@ -66,8 +67,9 @@ class FuncConfigCenter : IMogoOnMessageListener<FuncConfig>, IMoGoAutopilotCarCo
|
||||
}
|
||||
|
||||
override fun onMsgReceived(obj: FuncConfig?) {
|
||||
Log.d(TAG, "onMsgReceived Business : $obj")
|
||||
obj?.let {
|
||||
refreshConfig(it)
|
||||
invokeUpdate(it)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,6 +83,10 @@ class FuncConfigCenter : IMogoOnMessageListener<FuncConfig>, IMoGoAutopilotCarCo
|
||||
)
|
||||
private fun refreshConfig(funcConfig: FuncConfig) {
|
||||
BizManager.updateBizConfigData(funcConfig)
|
||||
invokeUpdate(funcConfig)
|
||||
}
|
||||
|
||||
private fun invokeUpdate(funcConfig: FuncConfig) {
|
||||
funcConfig.business.forEach { business ->
|
||||
CallerDevaToolsFuncConfigListenerManager.invokeDevaToolsFuncConfigBizUpdate(
|
||||
business.biz.uppercase(),
|
||||
|
||||
Reference in New Issue
Block a user