[6.6.0] fix bug of channel role ,which cause updateVersion, sync role to mis, fun param to mis .. had failed
This commit is contained in:
@@ -291,6 +291,16 @@ class DevaToolsProvider : IDevaToolsProvider, IAppStateListener {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 受channel业务影响的功能,需要更新,todo 建议有流程
|
||||
* AppIdentityModeUtils.getMisChannelCode
|
||||
*/
|
||||
override fun updateAppChannel() {
|
||||
bizConfigCenter.updateChannelRole() //功能开关配置更新
|
||||
traceManager.syncConfig() //同步信息至ms
|
||||
BindingCarManager.queryAppUpgrade() //更新App升级信息
|
||||
}
|
||||
|
||||
private fun initMatrix() {
|
||||
val builder: Matrix.Builder = Matrix.Builder(AbsMogoApplication.getApp())
|
||||
builder.pluginListener(object : PluginListener {
|
||||
|
||||
@@ -20,6 +20,8 @@ import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_DEVA
|
||||
import com.mogo.commons.storage.SharedPrefsMgr
|
||||
import com.mogo.eagle.core.data.deva.report.WorkOrderReportInfo
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.eagle.core.utilcode.mogo.getMisChannelCode
|
||||
import com.zhjt.mogo_core_function_devatools.trace.TraceManager
|
||||
import com.zhjt.mogo_core_function_devatools.upgrade.IPCUpgradeManager.Companion.ipcUpgradeManager
|
||||
import com.zhjt.mogo_core_function_devatools.upgrade.ObuUpgradeAppNetWorkManager
|
||||
@@ -228,7 +230,7 @@ object BindingCarManager : IMoGoAutopilotCarConfigListener, IMoGoCloudListener {
|
||||
}
|
||||
CallerLogger.d(M_DEVA + "UPGRADE", "---- 3 ----[mac: $macAddress]")
|
||||
UpgradeAppNetWorkManager.instance
|
||||
?.getAppUpgradeInfo(mContext, macAddress, role.toString() + "")
|
||||
?.getAppUpgradeInfo(mContext, macAddress, AppIdentityModeUtils.getMisChannelCode(FunctionBuildConfig.appIdentityMode).toString() + "")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -10,6 +10,8 @@ import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_TYPE_ST
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotCarConfigListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotCarConfigListenerManager
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsFuncConfigListenerManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_DEVA
|
||||
import com.mogo.eagle.core.utilcode.util.GsonUtils
|
||||
import com.mogo.eagle.core.utilcode.util.SPUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
@@ -35,6 +37,8 @@ class FuncConfigCenter : IMogoOnMessageListener<FuncConfig>, IMoGoAutopilotCarCo
|
||||
|
||||
private var mContext: Context? = null
|
||||
private val funcConfigNetWorkModel = FuncConfigNetWorkModel()
|
||||
@Volatile
|
||||
private var macAddress:String? = null
|
||||
|
||||
fun init(context: Context) {
|
||||
mContext = context
|
||||
@@ -48,15 +52,26 @@ class FuncConfigCenter : IMogoOnMessageListener<FuncConfig>, IMoGoAutopilotCarCo
|
||||
refreshConfig(GsonUtils.fromJson(bizJson, FuncConfig::class.java))
|
||||
}
|
||||
|
||||
fun updateChannelRole(){
|
||||
macAddress?.let {
|
||||
refresh(it)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onAutopilotCarConfig(carConfigResp: MessagePad.CarConfigResp) {
|
||||
if (!carConfigResp.macAddress.isNullOrEmpty()) {
|
||||
UiThreadHandler.post {
|
||||
funcConfigNetWorkModel.requestFuncConfig(carConfigResp.macAddress, {
|
||||
SPUtils.getInstance("biz_config").put("config", GsonUtils.toJson(it))
|
||||
refreshConfig(it) }, {})
|
||||
}
|
||||
macAddress = carConfigResp.macAddress
|
||||
refresh(carConfigResp.macAddress)
|
||||
} else {
|
||||
ToastUtils.showLong("未获取到域控mac信息")
|
||||
CallerLogger.i("$M_DEVA$TAG","未获取到域控mac信息")
|
||||
}
|
||||
}
|
||||
|
||||
private fun refresh(macAddress: String){
|
||||
UiThreadHandler.post {
|
||||
funcConfigNetWorkModel.requestFuncConfig(macAddress, {
|
||||
SPUtils.getInstance("biz_config").put("config", GsonUtils.toJson(it))
|
||||
refreshConfig(it) }, {})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user