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
Running Settings Robolectric tests
The full suite
$ croot
$ atest SettingsRoboTests
Running a single test class
With a filter
$ croot
$ atest SettingsRoboTests:com.android.settings.display.AdaptiveSleepPreferenceControllerTest
You can also run any single test class with atest (it will try to find the correct path)
$ atest AdaptiveSleepPreferenceControllerTest