[Catalyst] Support RadioButtonPickerFragment

Bug: 368359967
Flag: com.android.settings.flags.catalyst_screen_timeout
Test: manual
Change-Id: Ibd3a1c52b152054bf01e37848785c5bda588df5f
This commit is contained in:
Jacky Wang
2024-11-16 03:22:58 +08:00
parent e6ef4c2443
commit 3a20528ae4
4 changed files with 30 additions and 21 deletions

View File

@@ -86,7 +86,13 @@ public abstract class RadioButtonPickerFragment extends SettingsPreferenceFragme
@Override
public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
super.onCreatePreferences(savedInstanceState, rootKey);
if (isCatalystEnabled()) {
PreferenceScreen preferenceScreen = createPreferenceScreen();
setPreferenceScreen(preferenceScreen);
updateActivityTitleWithScreenTitle(preferenceScreen);
} else {
super.onCreatePreferences(savedInstanceState, rootKey);
}
try {
// Check if the xml specifies if static preferences should go on the top or bottom
final List<Bundle> metadata = PreferenceXmlParserUtils.extractMetadata(getContext(),