android:key="dolby_top_intro"
android:title="@string/dolby_top_intro_summary" />
- <com.android.settingslib.widget.RadioButtonPreference
+ <com.android.settingslib.widget.SelectorWithWidgetPreference
android:defaultValue="true"
android:key="dolby_profile_auto"
android:title="@string/dolby_profile_auto" />
- <com.android.settingslib.widget.RadioButtonPreference
+ <com.android.settingslib.widget.SelectorWithWidgetPreference
android:key="dolby_profile_game"
android:title="@string/dolby_profile_game" />
- <com.android.settingslib.widget.RadioButtonPreference
+ <com.android.settingslib.widget.SelectorWithWidgetPreference
android:key="dolby_profile_game_1"
android:title="@string/dolby_profile_game_1" />
- <com.android.settingslib.widget.RadioButtonPreference
+ <com.android.settingslib.widget.SelectorWithWidgetPreference
android:key="dolby_profile_game_2"
android:title="@string/dolby_profile_game_2" />
- <com.android.settingslib.widget.RadioButtonPreference
+ <com.android.settingslib.widget.SelectorWithWidgetPreference
android:key="dolby_profile_movie"
android:title="@string/dolby_profile_movie" />
- <com.android.settingslib.widget.RadioButtonPreference
+ <com.android.settingslib.widget.SelectorWithWidgetPreference
android:key="dolby_profile_music"
android:title="@string/dolby_profile_music" />
- <com.android.settingslib.widget.RadioButtonPreference
+ <com.android.settingslib.widget.SelectorWithWidgetPreference
android:key="dolby_profile_off"
android:title="@string/dolby_profile_off" />
- <com.android.settingslib.widget.RadioButtonPreference
+ <com.android.settingslib.widget.SelectorWithWidgetPreference
android:key="dolby_profile_spacial_audio"
android:title="@string/dolby_profile_spacial_audio" />
- <com.android.settingslib.widget.RadioButtonPreference
+ <com.android.settingslib.widget.SelectorWithWidgetPreference
android:key="dolby_profile_voice"
android:title="@string/dolby_profile_voice" />
/*
- * Copyright (C) 2022 The LineageOS Project
+ * Copyright (C) 2022-2024 The LineageOS Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
import androidx.preference.PreferenceFragment
import com.android.settingslib.widget.MainSwitchPreference
-import com.android.settingslib.widget.RadioButtonPreference
+import com.android.settingslib.widget.SelectorWithWidgetPreference
import org.lineageos.dap.R
switchBar.isChecked = DolbyCore.isEnabled()
for ((key, value) in PREF_DOLBY_MODES) {
- val preference = findPreference<RadioButtonPreference>(key)!!
+ val preference = findPreference<SelectorWithWidgetPreference>(key)!!
preference.setOnPreferenceClickListener {
setProfile(value)
true
DolbyCore.setProfile(profile)
for ((key, value) in PREF_DOLBY_MODES) {
- val preference = findPreference<RadioButtonPreference>(key)!!
+ val preference = findPreference<SelectorWithWidgetPreference>(key)!!
preference.isChecked = value == profile
}
}