Pending Location information added to Dark Theme

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
This commit is contained in:
Marcelo Arteiro
2025-03-11 14:48:38 +00:00
parent cf5646c92b
commit 157030dcef
9 changed files with 118 additions and 10 deletions

View File

@@ -65,6 +65,13 @@
settings:searchable="false"/>
</PreferenceCategory>
<com.android.settingslib.widget.FooterPreference
android:key="dark_theme_connection_footer"
android:title= "@string/twilight_mode_pending_location"
android:selectable="false"
settings:searchable="false"
settings:controller="com.android.settings.display.darkmode.DarkModePendingLocationPreferenceController" />
<com.android.settingslib.widget.FooterPreference
android:key="dark_theme_custom_bedtime_footer"
android:title="@string/dark_ui_bedtime_footer_summary"