Migrate "duration for quick settings" to new modes page.

This mostly continues to use the existing dialogs in settingslib (ZenDurationDialog, SettingsEnableZenModeDialog) and creates a controller to read from the settings value.

Also updates the "turn on / turn off" button to respect the preferred duration.

Flag: android.app.modes_ui
Bug: 343444249
Test: ZenModeButtonPreferenceControllerTest, ManualDurationPreferenceControllerTest
Change-Id: I2fd49a79d9a5807fefdd7ec310a6cc60d70f9bb1
This commit is contained in:
Yuri Lin
2024-06-20 17:26:23 -04:00
parent 5653acd533
commit c1a4abbc51
8 changed files with 473 additions and 6 deletions

View File

@@ -67,5 +67,9 @@
<Preference
android:key="mode_display_settings"
android:title="@string/mode_display_settings_title" />
<Preference
android:key="mode_manual_duration"
android:title="@string/zen_category_duration" />
</PreferenceCategory>
</PreferenceScreen>