[Catalyst] Migrate AmbientDisplayAlwaysOnPreferenceController

As the preference is exported as external settings, for safety, do not
update the preference key with datastore key. As a workaround, manage a
mapping between preference hierarchy key and datastore key.

Bug: 372307567
Flag: com.android.settings.flags.catalyst_lockscreen_from_display_settings
Test: devtool
Change-Id: I56126485061859b41216cd23b8e1caf63823a1ec
This commit is contained in:
Jacky Wang
2024-11-21 10:21:55 +08:00
parent b6132572ea
commit efcb4dfddf
6 changed files with 136 additions and 6 deletions

View File

@@ -186,7 +186,7 @@ public abstract class SettingsPreferenceFragment extends InstrumentedPreferenceF
}
/** Returns if catalyst is enabled on current screen. */
protected final boolean isCatalystEnabled() {
public final boolean isCatalystEnabled() {
// TODO(b/379130874): make Catalyst compatible with desktop device, such as user restriction
// check.
Context context = getContext();