[6.3.0] fix bug

This commit is contained in:
EmArrow
2024-03-13 19:56:49 +08:00
parent 52daec6775
commit 7e6df9b216
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"

View File

@@ -11,6 +11,8 @@ object MoGoConfig {
// 域控制器 IP地址
const val AUTOPILOT_IP = "AUTOPILOT_IP"
//调试窗控制连接域控时是否启用认证存储key
const val AUTOPILOT_CERTIFICATION = "AUTOPILOT_CERTIFICATION"
// CMD全量日志抓取
const val CATCH_LOG = "CATCH_LOG"