[2.15.0]add func of obu config start up

This commit is contained in:
zhongchao
2023-04-03 15:42:44 +08:00
parent 94bb6c976b
commit 6056c6bc66
6 changed files with 21 additions and 12 deletions

View File

@@ -1,6 +1,7 @@
package com.mogo.eagle.core.function.datacenter.obu
import android.content.Context
import com.mogo.eagle.core.data.app.AppConfigInfo
import com.mogo.eagle.core.data.config.FunctionBuildConfig
import com.mogo.eagle.core.data.config.HmiBuildConfig
import com.mogo.eagle.core.data.enums.*
@@ -222,6 +223,9 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener {
* @param data 系统状态
*/
override fun onObuSystemStatus(data: MogoObuSystemStatusData?) {
data?.let {
AppConfigInfo.obuInfo = it.toString()
}
CallerObuInfoListenerManager.invokeGetObuInfo(data.toString())
}
@@ -246,7 +250,7 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener {
val str =
if (result.function === MogoObuConstants.CALL_FUNCTION.TOPIC_REGIST) "注册" else "取消注册"
val callRegisterResult = result as MogoObuCallRegisterResult
if (callRegisterResult.results != null && !callRegisterResult.results.isEmpty()) {
if (callRegisterResult.results != null && callRegisterResult.results.isNotEmpty()) {
val size = callRegisterResult.results.size
var i = 0
while (i < size) {

View File

@@ -2082,7 +2082,9 @@ internal class DebugSettingView @JvmOverloads constructor(
setLogCheckedChangeListener()
}
override fun onGetObuInfo(obuInfoStr: String) {
mObuInfoStr = obuInfoStr
override fun onGetObuInfo(obuInfoStr: String?) {
obuInfoStr?.let {
mObuInfoStr = it
}
}
}

View File

@@ -85,6 +85,8 @@ object AppConfigInfo {
var teleTimeStamp = 0L
var obuInfo:String = ""
override fun toString(): String {
return "<font color='red' size='30'>-------------------应用信息--------------------</font><br/>" +
"应用名称:${appName}<br/>" +
@@ -98,6 +100,7 @@ object AppConfigInfo {
"MAP-OPT-SDK版本${mapSdkOptVersion}<br/>" +
"ADAS-SDK版本${adasSdkVersion}<br/>" +
"OBU-SDK版本${obuSdkVersion}<br/>" +
"OBU-INFO版本${obuInfo}<br/>" +
"<font color='red' size='30'>------------------鉴权信息---------------------</font><br/>" +
"数字版权ID${widevineIDMd5}<br/>" +
"PAD唯一标志${uniqueDeviceId}<br/>" +

View File

@@ -11,6 +11,6 @@ interface IMoGoObuInfoListener {
/**
* @param obuInfoStr OBU信息
*/
fun onGetObuInfo(obuInfoStr: String)
fun onGetObuInfo(obuInfoStr: String?)
}

View File

@@ -9,7 +9,7 @@ import com.mogo.eagle.core.function.call.base.CallerBase
*/
object CallerObuInfoListenerManager : CallerBase<IMoGoObuInfoListener>() {
fun invokeGetObuInfo(obuInfoStr: String) {
fun invokeGetObuInfo(obuInfoStr: String?) {
M_LISTENERS.forEach {
val listener = it.value
listener.onGetObuInfo(obuInfoStr)