diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/MoGoHmiFragment.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/MoGoHmiFragment.kt index b30ccde589..b258ec9a96 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/MoGoHmiFragment.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/MoGoHmiFragment.kt @@ -1091,25 +1091,27 @@ class MoGoHmiFragment : MvpFragment(), * 控制展示限速标志及内容 */ override fun showLimitingVelocity(limitingSpeed: Int, limitSpeedSource: Int) { - // 控制 限速UI 展示 - if (HmiBuildConfig.isShowLimitingVelocityView) { - if (limitingSpeed > 0) { - mViewLimitingVelocity?.visibility = View.VISIBLE - mViewLimitingVelocity?.updateLimitingSpeed(limitingSpeed, limitSpeedSource) - tvLimitingSource?.visibility = View.VISIBLE - if (limitSpeedSource == 1) { - tvLimitingSource.text = "MAP" - } else if (limitSpeedSource == 2) { - tvLimitingSource.text = "RSU" + ThreadUtils.runOnUiThread { + // 控制 限速UI 展示 + if (HmiBuildConfig.isShowLimitingVelocityView) { + if (limitingSpeed > 0) { + mViewLimitingVelocity?.visibility = View.VISIBLE + mViewLimitingVelocity?.updateLimitingSpeed(limitingSpeed, limitSpeedSource) + tvLimitingSource?.visibility = View.VISIBLE + if (limitSpeedSource == 1) { + tvLimitingSource.text = "MAP" + } else if (limitSpeedSource == 2) { + tvLimitingSource.text = "RSU" + } + } else { + mViewLimitingVelocity?.visibility = View.INVISIBLE + mViewLimitingVelocity?.updateLimitingSpeed(0, limitSpeedSource) + tvLimitingSource?.visibility = View.INVISIBLE } } else { - mViewLimitingVelocity?.visibility = View.INVISIBLE - mViewLimitingVelocity?.updateLimitingSpeed(0, limitSpeedSource) - tvLimitingSource?.visibility = View.INVISIBLE + disableLimitingVelocity() + tvLimitingSource?.visibility = View.GONE } - } else { - disableLimitingVelocity() - tvLimitingSource?.visibility = View.GONE } }