[6.8.0][应用升级] 优化mac地址获取逻辑
This commit is contained in:
@@ -78,9 +78,6 @@ object BindingCarManager : IMoGoAutopilotCarConfigListener, IMoGoCloudListener {
|
||||
"${M_DEVA}${TAG}",
|
||||
"onAutopilotCarConfig carConfigResp.macAddress = ${carConfigResp.macAddress} "
|
||||
)
|
||||
if (SharedPrefsMgr.getInstance().sn.isNullOrEmpty()) {
|
||||
return
|
||||
}
|
||||
this.carConfigResp = carConfigResp
|
||||
getBindingCarInfo(carConfigResp.macAddress, SharedPrefsMgr.getInstance().sn)
|
||||
}
|
||||
|
||||
@@ -95,6 +95,10 @@ class UpgradeAppNetWorkManager private constructor() {
|
||||
Log.d(TAG, "getAppUpgradeInfo: -> records:" + records?.entries?.joinToString(",") { itx -> "key:${itx.key} -> value:[${itx.value.joinToString(",") { "${it.first},${it.second}" } }]"})
|
||||
val versionCode = AppUtils.getAppVersionCode()
|
||||
val versionName = AppUtils.getAppVersionName()
|
||||
val latestMacAddress = BindingCarManager.getMacAddress()
|
||||
if (latestMacAddress != null && !TextUtils.equals(latestMacAddress, macAddress)) {
|
||||
macAddress = latestMacAddress
|
||||
}
|
||||
Log.d(SceneConstant.M_DEVA + TAG, "getAppUpgradeInfo mac = $macAddress---type = $type---sn = $sn---versionCode =$versionCode---versionName =$versionName")
|
||||
val request = UpgradeAppRequest(sn, macAddress, type, versionName, "1")
|
||||
val requestBody = RequestBody.create(MediaType.get("application/json;charset=UTF-8"), GsonUtil.jsonFromObject(request))
|
||||
|
||||
Reference in New Issue
Block a user