From df5099635526508e0d61dbbc56af8c53452d9c19 Mon Sep 17 00:00:00 2001 From: EmArrow Date: Tue, 7 May 2024 16:50:33 +0800 Subject: [PATCH] [6.4.0] fix bug of thread --- .../function/hmi/ui/setting/StatusSummaryView.kt | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/StatusSummaryView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/StatusSummaryView.kt index 4faa82f169..49cfb3ced5 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/StatusSummaryView.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/StatusSummaryView.kt @@ -235,26 +235,27 @@ class StatusSummaryView @JvmOverloads constructor( override fun authCrtFile(device: String, root: String) { super.authCrtFile(device, root) - UiThreadHandler.post { + UiThreadHandler.post ({ if (data.size < 6) return@post data[5].desc = "本机证书已下载" data[5].isException = false adapter?.notifyItemChanged(5) - } + }, UiThreadHandler.MODE.QUEUE) } override fun authCrtError(errorMsg: String) { super.authCrtError(errorMsg) - UiThreadHandler.post { + UiThreadHandler.post ({ if (data.size < 6) return@post data[5].desc = "本机证书下载异常:$errorMsg" data[5].isException = true adapter?.notifyItemChanged(5) - } + }, UiThreadHandler.MODE.QUEUE) } override fun onCertificationResult(msg: String) { super.onCertificationResult(msg) +// Log.i("emArrow","onCertificationResult : $msg") if (!SharedPrefsMgr.getInstance().getBoolean( "${MoGoConfig.AUTOPILOT_CERTIFICATION}-${DebugConfig.getNetMode()}", MoGoConfig.AUTOPILOT_CERTIFICATION_DEFAULT_VALUE @@ -262,11 +263,11 @@ class StatusSummaryView @JvmOverloads constructor( ) { return } - UiThreadHandler.post { + UiThreadHandler.post ({ if (data.size < 6) return@post data[5].desc = msg data[5].isException = !msg.contains("成功校验") adapter?.notifyItemChanged(5) - } + }, UiThreadHandler.MODE.QUEUE) } } \ No newline at end of file