[8.2.2][feat]新增B2美化呈现UI开发

This commit is contained in:
xinfengkun
2025-09-08 10:29:28 +08:00
parent ee303ec357
commit bb2d4996fc
15 changed files with 146 additions and 28 deletions

View File

@@ -388,10 +388,11 @@ class TeleMsgHandler : IMsgHandler {
}
TelematicConstant.CONTROL_B2_PRETTIFY_SWITCH -> {
CallerTelematicListenerManager.invokeReceivedMsg(
TelematicConstant.CONTROL_B2_PRETTIFY_SWITCH,
it.body
)
val value = when (String(it.body)) {
"1" -> true
else -> false
}
CallerTelematicListenerManager.dispatchB2DemoMode(value)
}
TelematicConstant.SHOW_TRAFFIC_LIGHT -> {

View File

@@ -25,6 +25,14 @@ object FunctionBuildConfig {
@JvmField
var isDemoMode = false
/**
* B2专用美化模式状态
* 目前仅用于自动驾驶状态UI变更
*/
@Volatile
@JvmField
var isB2DemoMode = false
/**
* 6.2.6版本增加接管提醒开关
* 控制掉自驾、接管类的消息是否展示包括系统信息接管提醒、fm紧急停车提醒、平行驾驶接管提醒

View File

@@ -7,5 +7,7 @@ interface IReceivedMsgListener {
fun onDemoMode(isDemoMode: Boolean) {}
fun onB2DemoMode(isB2DemoMode: Boolean) {}
fun onFusionColor(fusionColor: Boolean){}
}

View File

@@ -58,6 +58,21 @@ object CallerTelematicListenerManager: CallerBase<IReceivedMsgListener>() {
}
}
fun dispatchB2DemoMode(isB2DemoMode: Boolean) {
if (isB2DemoMode != FunctionBuildConfig.isB2DemoMode) {
FunctionBuildConfig.isB2DemoMode = isB2DemoMode
M_LISTENERS.forEach {
val listener = it.value
try {
listener.onB2DemoMode(isB2DemoMode)
} catch (e: Exception) {
e.printStackTrace()
Log.e(TAG, "转发B2美化模式出现异常${e.message}")
}
}
}
}
fun dispatchFusionColor(fusionColor: Boolean) {
if (fusionColor != FunctionBuildConfig.isFusionColor) {
// FunctionBuildConfig.isFusionColor = fusionColor