Merge branch 'dev_robotaxi-d_240227_6.3.0' of gitlab.zhidaoauto.com:SCA/L4HA/AndroidApp/MoGoEagleEye into dev_robotaxi-d_240227_6.3.0

This commit is contained in:
xinfengkun
2024-03-13 20:11:24 +08:00
3 changed files with 23 additions and 9 deletions

View File

@@ -1058,6 +1058,9 @@ internal class DebugSettingView @JvmOverloads constructor(
ToastUtils.showLong("经纬度复制成功")
}
val certTxt = if(CallerCloudCertManager.getRootCrtF().isNullOrEmpty()) "未下载证书" else "已下载证书"
tvCertFile.text = "证书状态: $certTxt"
//状态中心-后台优化状态
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
val backgroundStatus = "后台运行:" + if (BackgrounderPermission.getInstance()
@@ -1269,26 +1272,28 @@ internal class DebugSettingView @JvmOverloads constructor(
}
}
//是否启用证书认证
cbSsl.isChecked = !CallerCloudCertManager.getRootCrtF().isNullOrEmpty()
cbSsl.isChecked = SharedPrefsMgr.getInstance().getBoolean(MoGoConfig.AUTOPILOT_CERTIFICATION,false)
cbSsl.setOnCheckedChangeListener { _, isChecked ->
cbSsl.isChecked = isChecked
SharedPrefsMgr.getInstance().putBoolean(MoGoConfig.AUTOPILOT_CERTIFICATION,isChecked)
//下载证书
if(isChecked){
if(!CallerCloudCertManager.getRootCrtF().isNullOrEmpty()){
cbSsl.isChecked = true
}else{
if(CallerCloudCertManager.getRootCrtF().isNullOrEmpty()){
CallerCloudCertManager.certFileDownLoad{ errorMsg ->
ToastUtils.showShort(errorMsg)
cbSsl.isChecked = false
ThreadUtils.runOnUiThread {
ToastUtils.showShort(errorMsg)
}
}
}
}else{
cbSsl.isChecked = false
}
}
}
override fun authCrtFile(device: String, root: String) {
super.authCrtFile(device, root)
cbSsl.isChecked = true
ThreadUtils.runOnUiThread {
tvCertFile.text = "证书状态: 已下载证书"
}
}
/**

View File

@@ -662,6 +662,13 @@
android:layout_height="1dp"
android:background="#F0F0F0" />
<TextView
android:id="@+id/tvCertFile"
style="@style/DebugSettingText"
android:text="证书状态: 未下载证书"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/tvBackgroundOperation"
style="@style/DebugSettingText"