[2.13.2-sop] 2.13.4 fix bug of thread problem

This commit is contained in:
zhongchao
2023-02-17 14:50:32 +08:00
parent b4523db91e
commit 280e94a1d8

View File

@@ -1091,25 +1091,27 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
* 控制展示限速标志及内容
*/
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
}
}