[6.9.0]OTA升级

This commit is contained in:
xuxinchao
2024-12-03 16:52:36 +08:00
parent ac756f3b66
commit 5221bda15b
3 changed files with 32 additions and 2 deletions

View File

@@ -1,6 +1,7 @@
package com.zhjt.mogo_core_function_devatools.ota
import android.content.Context
import android.util.Log
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
import com.mogo.eagle.core.function.api.datacenter.IDataCenterBizListener
import com.mogo.eagle.core.function.api.devatools.IOTAListener
@@ -8,6 +9,7 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
import com.mogo.eagle.core.function.call.datacenter.CallerDataCenterBizListener
import com.mogo.eagle.core.function.call.devatools.CallerOTAManager
import org.json.JSONArray
import system_master.SsmInfo
/**
@@ -67,6 +69,16 @@ object OTAUpgradeManager: IMoGoAutopilotStatusListener, IDataCenterBizListener,
override fun onOtaStatus(status: SsmInfo.OtaStatus) {
super.onOtaStatus(status)
OTAUpgradeConfig.otaToken = status.otaInfo.otaToken
Log.i(TAG,"status.otaInfo.otaToken"+status.otaInfo.otaToken)
Log.i(TAG,"status.otaInfo.productName"+status.otaInfo.productName)
//解析JSON
val productArray = JSONArray(status.otaInfo.productName)
if(productArray.length() > 0){
}
}