[8.2.2][feat]新增B2美化呈现开关
This commit is contained in:
@@ -878,6 +878,7 @@ class OperatePanelLayout : LinearLayout {
|
||||
private const val KEY_DEMO_SWITCH = "demo_switch"
|
||||
private const val KEY_RECORD_BAG_DIALOG = "record_bag_dialog"
|
||||
private const val KEY_TAKE_OVER_WAKE = "take_over_wake"
|
||||
private const val KEY_MOGO_PRETTIFY_SWITCH = "mogo_prettify_switch"
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
@@ -915,6 +916,9 @@ class OperatePanelLayout : LinearLayout {
|
||||
KEY_TAKE_OVER_WAKE -> {
|
||||
return FunctionBuildConfig.isTakeoverRemind
|
||||
}
|
||||
KEY_MOGO_PRETTIFY_SWITCH -> {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return super.getDefaultVal(pref)
|
||||
}
|
||||
@@ -952,6 +956,21 @@ class OperatePanelLayout : LinearLayout {
|
||||
clickEventAnalytics("接管提醒", isChecked)
|
||||
return true
|
||||
}
|
||||
KEY_MOGO_PRETTIFY_SWITCH -> {
|
||||
val isChecked = newValue as? Boolean ?: false
|
||||
if (isChecked) {
|
||||
CallerTelematicManager.sendMsgToAllClients(
|
||||
TelematicConstant.CONTROL_B2_PRETTIFY_SWITCH,
|
||||
"1".toByteArray()
|
||||
)
|
||||
} else {
|
||||
CallerTelematicManager.sendMsgToAllClients(
|
||||
TelematicConstant.CONTROL_B2_PRETTIFY_SWITCH,
|
||||
"0".toByteArray()
|
||||
)
|
||||
}
|
||||
return true
|
||||
}
|
||||
}
|
||||
return super.onPreferenceChange(preference, newValue)
|
||||
}
|
||||
|
||||
@@ -19,5 +19,12 @@
|
||||
android:persistent="false"
|
||||
android:layout="@layout/layout_operate_panel_preference_switch_compat"
|
||||
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat"/>
|
||||
<SwitchPreferenceCompat
|
||||
android:key="mogo_prettify_switch"
|
||||
android:title="B2乘客屏驾驶状态美化呈现"
|
||||
android:persistent="false"
|
||||
android:enabled="true"
|
||||
android:layout="@layout/layout_operate_panel_preference_switch_compat"
|
||||
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat"/>
|
||||
</PreferenceCategory>
|
||||
</androidx.preference.PreferenceScreen>
|
||||
Reference in New Issue
Block a user