[6.7.0][运营面板] 优化代码逻辑
This commit is contained in:
@@ -534,7 +534,7 @@ class OperatePanelLayout : LinearLayout {
|
||||
val isPressed = preference.extras.getBoolean("is_pressed", true)
|
||||
if (!isPressed) {
|
||||
preference.extras.remove("is_pressed")
|
||||
return true
|
||||
return false
|
||||
}
|
||||
val isChecked = newValue as? Boolean ?: false
|
||||
hmiAction("SOP 演示模式开关, ", !FunctionBuildConfig.isDemoMode)
|
||||
@@ -545,18 +545,21 @@ class OperatePanelLayout : LinearLayout {
|
||||
if (!FunctionBuildConfig.isDemoMode) { //关闭美化模式时,通知工控机
|
||||
CallerAutoPilotControlManager.setIPCDemoMode(FunctionBuildConfig.isDemoMode)
|
||||
}
|
||||
return true
|
||||
}
|
||||
KEY_RECORD_BAG_DIALOG -> {
|
||||
val isChecked = newValue as? Boolean ?: false
|
||||
FunctionBuildConfig.isShowBagRecordWindow = isChecked
|
||||
hmiAction("SOP 是否展示录包弹窗, ", isChecked)
|
||||
clickEventAnalytics("录包弹窗", isChecked)
|
||||
return true
|
||||
}
|
||||
KEY_TAKE_OVER_WAKE -> {
|
||||
val isChecked = newValue as? Boolean ?: false
|
||||
FunctionBuildConfig.isTakeoverRemind = isChecked
|
||||
hmiAction("SOP 是否展示接管提醒, ", isChecked)
|
||||
clickEventAnalytics("接管提醒", isChecked)
|
||||
return true
|
||||
}
|
||||
}
|
||||
return super.onPreferenceChange(preference, newValue)
|
||||
@@ -810,6 +813,7 @@ class OperatePanelLayout : LinearLayout {
|
||||
CallerLogger.d(TAG, "发送开关数据:${isChecked}到乘客屏")
|
||||
CallerTelematicManager.sendMsgToAllClients(TelematicConstant.WEATHER_SWITCH_STATUS, (if (isChecked) "1" else "0").toByteArray())
|
||||
clickEventAnalytics("天气效果开关", isChecked)
|
||||
return true
|
||||
}
|
||||
KEY_SYSTEM_BOOT_STATUS_SHOW -> {
|
||||
val isChecked = newValue as? Boolean ?: false
|
||||
@@ -817,6 +821,7 @@ class OperatePanelLayout : LinearLayout {
|
||||
clickEventAnalytics("系统启动状态展示", isChecked)
|
||||
HmiBuildConfig.isShowConnectionProgressView = isChecked
|
||||
CallerHmiViewControlListenerManager.updateConnectionProgressView(isChecked)
|
||||
return true
|
||||
}
|
||||
KEY_SWEEPER_CLOUD_CONTROL -> {
|
||||
val isChecked = newValue as? Boolean ?: false
|
||||
@@ -836,6 +841,7 @@ class OperatePanelLayout : LinearLayout {
|
||||
confirmDialog.showSweeperModeChangeConfirmDialog()
|
||||
}
|
||||
clickEventAnalytics("清扫云控业务", isChecked)
|
||||
return true
|
||||
}
|
||||
}
|
||||
return super.onPreferenceChange(preference, newValue)
|
||||
@@ -1217,7 +1223,7 @@ class OperatePanelLayout : LinearLayout {
|
||||
val isPressed = preference.extras.getBoolean("is_pressed", true)
|
||||
if (!isPressed) {
|
||||
preference.extras.remove("is_pressed")
|
||||
return true
|
||||
return false
|
||||
}
|
||||
val isChecked = newValue as? Boolean ?: false
|
||||
hmiAction("SOP 雨天模式开关, ", isChecked)
|
||||
|
||||
Reference in New Issue
Block a user