1、降级地图版本2.0.0.18
2、优化控制面板状态展示,增加外部SDK版本展示,合并外部网络连接状态展示

Signed-off-by: donghongyu <donghongyu@zhidaoauto.com>
This commit is contained in:
donghongyu
2021-12-31 15:09:34 +08:00
parent 19ff517971
commit c8ab0ae124
10 changed files with 286 additions and 223 deletions

View File

@@ -7,6 +7,7 @@ import android.view.View
import androidx.constraintlayout.widget.ConstraintLayout
import com.mogo.cloud.passport.MoGoAiCloudClient
import com.mogo.commons.AbsMogoApplication
import com.mogo.commons.debug.DebugConfig
import com.mogo.eagle.core.data.app.AppConfigInfo
import com.mogo.eagle.core.data.autopilot.AutopilotCarStateInfo
import com.mogo.eagle.core.data.autopilot.AutopilotGuardianStatusInfo
@@ -30,7 +31,6 @@ import com.mogo.eagle.core.function.call.map.CallerSmpManager
import com.mogo.eagle.core.function.call.obu.CallerOBUManager
import com.mogo.eagle.core.function.call.obu.CallerObuListenerManager
import com.mogo.eagle.core.function.hmi.R
import com.mogo.eagle.core.network.utils.GsonUtil
import com.mogo.eagle.core.utilcode.mogo.logger.LogLevel
import com.mogo.eagle.core.utilcode.mogo.logger.Logger
import com.mogo.eagle.core.utilcode.util.AppUtils
@@ -39,6 +39,7 @@ import com.mogo.eagle.core.utilcode.util.LogUtils
import com.mogo.eagle.core.utilcode.util.ToastUtils
import com.mogo.map.MogoMap
import com.mogo.utils.DeviceIdUtils
import com.mogo.utils.NetworkUtils
import com.mogo.utils.UiThreadHandler
import com.mogo.utils.storage.SharedPrefsMgr
import kotlinx.android.synthetic.main.view_debug_setting.view.*
@@ -57,6 +58,8 @@ class DebugSettingView @JvmOverloads constructor(
IMoGoAutopilotStatusListener, IMoGoAutopilotCarStateListener, IMoGoMapLocationListener {
private val TAG = "DebugSettingView"
// 初始化App 配置信息
val mAppConfigInfo = AppConfigInfo()
init {
LayoutInflater.from(context).inflate(R.layout.view_debug_setting, this, true)
@@ -135,19 +138,8 @@ class DebugSettingView @JvmOverloads constructor(
tvAutopilotInfo.text =
CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfoJsonString()
// 初始化App 配置信息
val appConfigInfo = AppConfigInfo()
appConfigInfo.appName = AppUtils.getAppName()
appConfigInfo.appVersionCode = AppUtils.getAppVersionCode()
appConfigInfo.appVersionName = AppUtils.getAppVersionName()
appConfigInfo.appPackageName = AppUtils.getAppPackageName()
appConfigInfo.uniqueDeviceId = DeviceIdUtils.getDeviceId(AbsMogoApplication.getApp())
appConfigInfo.mogoSN = MoGoAiCloudClient.getInstance().aiCloudClientConfig.sn
appConfigInfo.mogoToken = MoGoAiCloudClient.getInstance().aiCloudClientConfig.token
appConfigInfo.mapVersion = MogoMap.getInstance().mogoMap.mapVersion
// 将数据绘制
tvAppInfo.text = GsonUtil.jsonFromObject(appConfigInfo)
// 绘制应用基本信息
drawAppInfo()
// 初始化OBU IP信息
val ipAddress =
@@ -287,12 +279,36 @@ class DebugSettingView @JvmOverloads constructor(
}
}
/**
* 绘制应用基本
*/
private fun drawAppInfo() {
mAppConfigInfo.appName = AppUtils.getAppName()
mAppConfigInfo.appVersionCode = AppUtils.getAppVersionCode()
mAppConfigInfo.appVersionName = AppUtils.getAppVersionName()
mAppConfigInfo.appPackageName = AppUtils.getAppPackageName()
mAppConfigInfo.uniqueDeviceId = DeviceIdUtils.getDeviceId(AbsMogoApplication.getApp())
mAppConfigInfo.mogoSN = MoGoAiCloudClient.getInstance().aiCloudClientConfig.sn
mAppConfigInfo.mogoToken = MoGoAiCloudClient.getInstance().aiCloudClientConfig.token
mAppConfigInfo.mapSdkVersion = MogoMap.getInstance().mogoMap.mapVersion
mAppConfigInfo.isConnectNet = NetworkUtils.isConnected(context)
mAppConfigInfo.isConnectSocket = DebugConfig.isDownloadSnapshot()
// 将数据绘制
tvAppInfo.text = mAppConfigInfo.toString()
}
/**
* OBU状态回调
*/
override fun onObuStatusResponse(obuStatusInfo: ObuStatusInfo) {
UiThreadHandler.post {
tvObuInfo.text = GsonUtils.toJson(obuStatusInfo)
mAppConfigInfo.obuSdkVersion = obuStatusInfo.obuSdkVersion
mAppConfigInfo.isConnectObu = obuStatusInfo.obuStatus
drawAppInfo()
}
}
@@ -303,6 +319,10 @@ class DebugSettingView @JvmOverloads constructor(
UiThreadHandler.post {
tvAutopilotInfo.post {
tvAutopilotInfo.text = GsonUtils.toJson(autoPilotStatusInfo)
mAppConfigInfo.adasSdkVersion = autoPilotStatusInfo.version
mAppConfigInfo.isConnectAutopilot = autoPilotStatusInfo.connectStatus
drawAppInfo()
}
}
}

View File

@@ -15,6 +15,33 @@
android:layout_height="match_parent"
android:orientation="vertical">
<!--鹰眼应用配置信息-->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#B200BCD4"
android:padding="@dimen/dp_10"
android:text="鹰眼应用信息"
android:textColor="#000"
android:textSize="@dimen/dp_34"
android:textStyle="bold" />
<TextView
android:id="@+id/tvAppInfo"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="#000"
android:textSize="@dimen/dp_34"
tools:text="应用基础信息" />
</LinearLayout>
<!--鹰眼UI控制-->
<ToggleButton
android:id="@+id/btnOpenDebugSettingViewControl"
android:layout_width="match_parent"
@@ -324,30 +351,6 @@
</LinearLayout>
<!--鹰眼应用配置信息-->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#B200BCD4"
android:padding="@dimen/dp_10"
android:text="鹰眼应用配置信息"
android:textColor="#000"
android:textSize="@dimen/dp_34"
android:textStyle="bold" />
<TextView
android:id="@+id/tvAppInfo"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="#000"
android:textSize="@dimen/dp_34" />
</LinearLayout>
<!--OBU 配置信息-->
<LinearLayout