[2.15.0] 优化obu升级

This commit is contained in:
lixiaopeng
2023-04-20 15:06:01 +08:00
parent fbd07fdce6
commit da7c9ca2d2
7 changed files with 75 additions and 49 deletions

View File

@@ -1,6 +1,7 @@
package com.mogo.eagle.core.function.datacenter.obu
import android.content.Context
import android.util.Log
import com.mogo.eagle.core.data.app.AppConfigInfo
import com.mogo.eagle.core.data.config.FunctionBuildConfig
import com.mogo.eagle.core.data.config.HmiBuildConfig
@@ -100,7 +101,9 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener {
* 上传obu文件的状态, 升级成功需要删除obu的文件和解压文件夹
*/
override fun onUpgradeStatus(status: ObuSoftwareUpgradeStatus?, t: Throwable?) {
CallerLogger.d("$M_OBU${MogoObuConst.TAG_UPGRADE_OBU}", "onUpgradeStatus status = $status ")
if (t != null) {
CallerLogger.d("$M_OBU${MogoObuConst.TAG_UPGRADE_OBU}", "onUpgradeStatus status = $status --- t = ${t.cause.toString()}")
}
//上传完成就相当于成功了,立即升级,比上电升级,只是多了一个重启
if (status == ObuSoftwareUpgradeStatus.UPLOAD_FINISH || status == ObuSoftwareUpgradeStatus.EXEC_UPGRADE_PROGRAM_FINISH
|| status == ObuSoftwareUpgradeStatus.CONNECTION_FAILED || status == ObuSoftwareUpgradeStatus.AUTHENTICATION_FAILED