Resolved an issue in Settings where sunset/sunrise dark mode failed silently when a location was unavailable. Now, an error dialog is shown, even if location services are enabled, but a specific location is missing. A footer stating the same issue is now present while the location is pending. Existing banner that appears when Location is disabled is now being removed once Location is turned on. Previously the UI would refresh only after exiting and returning to the preference view. Bug: 324548844 Bug: 402025928 Test: atest UiModeManagerServiceTest Flag: EXEMPT bugfix Change-Id: I914937185f11a686b453f929728b6329ebd05389
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