[3.2.0][应用升级] 优化代码逻辑
This commit is contained in:
@@ -42,6 +42,9 @@ class BindingCarManager : IMoGoAutopilotCarConfigListener {
|
||||
@Volatile
|
||||
private var mAddress: String? = null
|
||||
|
||||
@Volatile
|
||||
private var mObuVersion: String? = null
|
||||
|
||||
@Volatile
|
||||
private var mWidevineIDWithMd5 //google 数字版权
|
||||
: String? = null
|
||||
@@ -65,8 +68,20 @@ class BindingCarManager : IMoGoAutopilotCarConfigListener {
|
||||
if (!TextUtils.isEmpty(carConfigResp.macAddress)) {
|
||||
Logger.d("${SceneConstant.M_BINDING}${TAG}",
|
||||
"onAutopilotCarConfig carConfigResp.macAddress = ${carConfigResp.macAddress} ")
|
||||
var flag = false
|
||||
if (mAddress.isNullOrEmpty()) {
|
||||
flag = true
|
||||
}
|
||||
Logger.d("${SceneConstant.M_BINDING}${TAG}",
|
||||
"onAutopilotCarConfig - triggerUpgrade -> $flag")
|
||||
getBindingCarInfo(carConfigResp.macAddress, MoGoAiCloudClientConfig.getInstance().sn)
|
||||
queryAppUpgrade()
|
||||
if (flag) {
|
||||
queryAppUpgrade()
|
||||
val obuVersion = mObuVersion
|
||||
if (obuVersion != null) {
|
||||
queryObuUpgrade(obuVersion)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -182,12 +197,12 @@ class BindingCarManager : IMoGoAutopilotCarConfigListener {
|
||||
* obu的升级,只需要司机屏连接
|
||||
*/
|
||||
fun queryObuUpgrade(obuVersionName: String) {
|
||||
mObuVersion = obuVersionName
|
||||
CallerLogger.d("${SceneConstant.M_OBU}${MogoObuConst.TAG_UPGRADE_OBU}", "screenType = $screenType ----role = $role")
|
||||
if (screenType == 1) {
|
||||
CallerLogger.d("${SceneConstant.M_OBU}${MogoObuConst.TAG_UPGRADE_OBU}","queryObuUpgrade isConnected = ${CallerObuApiManager.isConnected()} --- mAddress = $mAddress")
|
||||
ObuUpgradeAppNetWorkManager.instance?.getObuUpgradeInfo(mContext, if(!mAddress.isNullOrEmpty()) mAddress else SharedPrefsMgr.getInstance(mContext!!).getString(SharedPrefsConstants.APP_MAC), obuVersionName)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user