[dev_robotaxi-d_230412_2.15.0] 添加v2i新类型,优化升级请求
This commit is contained in:
@@ -5,6 +5,7 @@ import android.text.TextUtils
|
||||
import android.util.Log
|
||||
import com.elegant.utils.UiThreadHandler
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
|
||||
import com.mogo.commons.constants.SharedPrefsConstants
|
||||
import com.mogo.eagle.core.data.app.AppConfigInfo.role
|
||||
import com.mogo.eagle.core.data.deva.bindingcar.ModifyBindingcarInfo
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
@@ -24,7 +25,9 @@ import com.zhjt.mogo_core_function_devatools.upgrade.ObuUpgradeAppNetWorkManager
|
||||
import com.zhjt.mogo_core_function_devatools.upgrade.UpgradeAppNetWorkManager
|
||||
import mogo.telematics.pad.MessagePad
|
||||
|
||||
|
||||
/**
|
||||
* 车辆绑定
|
||||
*/
|
||||
class BindingCarManager : IMoGoAutopilotCarConfigListener {
|
||||
|
||||
companion object {
|
||||
@@ -61,6 +64,10 @@ class BindingCarManager : IMoGoAutopilotCarConfigListener {
|
||||
override fun onAutopilotCarConfig(carConfigResp: MessagePad.CarConfigResp) {
|
||||
if (carConfigResp != null && !TextUtils.isEmpty(carConfigResp.macAddress)) {
|
||||
Log.d("Upgrade", "MoGoHandAdasMsgManager address = " + carConfigResp.macAddress)
|
||||
CallerLogger.d(
|
||||
"$M_DEVA$TAG",
|
||||
"onAutopilotCarConfig carConfigResp.macAddress = ${carConfigResp.macAddress} "
|
||||
)
|
||||
getBindingCarInfo(carConfigResp.macAddress, MoGoAiCloudClientConfig.getInstance().sn)
|
||||
}
|
||||
}
|
||||
@@ -75,6 +82,8 @@ class BindingCarManager : IMoGoAutopilotCarConfigListener {
|
||||
"$M_DEVA$TAG",
|
||||
"getBindingcarInfo macAddress = $macAddress--widevineIDWithMd5 = $widevineIDWithMd5"
|
||||
)
|
||||
SharedPrefsMgr.getInstance(mContext!!).putString(SharedPrefsConstants.APP_MAC, macAddress)
|
||||
|
||||
mAddress = macAddress
|
||||
mWidevineIDWithMd5 = widevineIDWithMd5
|
||||
if (screenType == 1) { //司机屏
|
||||
@@ -162,9 +171,13 @@ class BindingCarManager : IMoGoAutopilotCarConfigListener {
|
||||
* 查询app是否需要升级
|
||||
*/
|
||||
fun queryAppUpgrade() {
|
||||
UpgradeAppNetWorkManager.instance
|
||||
?.getAppUpgradeInfo(mContext, mAddress ?: "", role.toString() + "")
|
||||
// UpgradeAppNetWorkManager.instance
|
||||
// ?.getAppUpgradeInfo(mContext, mAddress ?: "", role.toString() + "")
|
||||
|
||||
(if(!mAddress.isNullOrEmpty()) mAddress else SharedPrefsMgr.getInstance(mContext!!).getString(SharedPrefsConstants.APP_MAC))?.let {
|
||||
UpgradeAppNetWorkManager.instance
|
||||
?.getAppUpgradeInfo(mContext, it, role.toString() + "")
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -174,7 +187,7 @@ class BindingCarManager : IMoGoAutopilotCarConfigListener {
|
||||
fun queryObuUpgrade(obuVersionName: String) {
|
||||
if (screenType == 1) {
|
||||
CallerLogger.d("${SceneConstant.M_OBU}${MogoObuConst.TAG_UPGRADE_OBU}","queryObuUpgrade isConnected = ${CallerObuApiManager.isConnected()} --- mAddress = $mAddress")
|
||||
ObuUpgradeAppNetWorkManager.instance?.getObuUpgradeInfo(mContext, mAddress, obuVersionName)
|
||||
ObuUpgradeAppNetWorkManager.instance?.getObuUpgradeInfo(mContext, if(!mAddress.isNullOrEmpty()) mAddress else SharedPrefsMgr.getInstance(mContext!!).getString(SharedPrefsConstants.APP_MAC), obuVersionName)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user