Add display and notif vis effects to new modes ui

Test: atest com.android.settings.notification.modes
Flag: android.app.modes_ui
Fixes: 337087926
Fixes: 308820151
Change-Id: Id9cd9cc4b2d521713a2ba1d4581eb818ad0e5eee
This commit is contained in:
Julia Reynolds
2024-05-21 16:59:40 -04:00
parent 3f2bcf973a
commit 4a84e58dba
18 changed files with 1508 additions and 15 deletions

View File

@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2024 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android"
android:title="@string/mode_display_settings_title">
<PreferenceCategory
android:key="display_options"
android:title="@string/mode_display_options_section">
<Preference
android:key="notification_visibility"
android:title="@string/zen_mode_restrict_notifications_title" />
<SwitchPreferenceCompat
android:key="effect_greyscale"
android:title="@string/mode_grayscale_title"
android:summary="@string/mode_grayscale_summary"/>
<SwitchPreferenceCompat
android:key="effect_aod"
android:title="@string/mode_aod_title"
android:summary="@string/mode_aod_summary"/>
<SwitchPreferenceCompat
android:key="effect_wallpaper"
android:title="@string/mode_wallpaper_title"
android:summary="@string/mode_wallpaper_summary"/>
<SwitchPreferenceCompat
android:key="effect_dark_theme"
android:title="@string/mode_dark_theme_title"
android:summary="@string/mode_dark_theme_summary"/>
</PreferenceCategory>
</PreferenceScreen>

View File

@@ -0,0 +1,59 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2024 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android"
android:key="zen_mode_block_settings_page"
android:title="@string/zen_mode_restrict_notifications_title">
<PreferenceCategory
android:title="@string/zen_mode_block_effects_screen_off"
android:key="zen_mode_block_screen_off">
<com.android.settings.widget.DisabledCheckBoxPreference
android:key="zen_effect_intent"
android:title="@string/zen_mode_block_effect_intent" />
<com.android.settings.widget.DisabledCheckBoxPreference
android:key="zen_effect_light"
android:title="@string/zen_mode_block_effect_light" />
<com.android.settings.widget.DisabledCheckBoxPreference
android:key="zen_effect_ambient"
android:title="@string/zen_mode_block_effect_ambient" />
</PreferenceCategory>
<PreferenceCategory
android:title="@string/zen_mode_block_effects_screen_on"
android:key="zen_mode_block_screen_on">
<com.android.settings.widget.DisabledCheckBoxPreference
android:key="zen_effect_badge"
android:title="@string/zen_mode_block_effect_badge" />
<com.android.settings.widget.DisabledCheckBoxPreference
android:key="zen_effect_status"
android:title="@string/zen_mode_block_effect_status" />
<com.android.settings.widget.DisabledCheckBoxPreference
android:key="zen_effect_peek"
android:title="@string/zen_mode_block_effect_peek" />
<com.android.settings.widget.DisabledCheckBoxPreference
android:key="zen_effect_list"
android:title="@string/zen_mode_block_effect_list" />
</PreferenceCategory>
</PreferenceScreen>

View File

@@ -22,12 +22,23 @@
android:key="header"
android:layout="@layout/settings_entity_header" />
<Preference
android:key="zen_mode_people"
android:title="@string/zen_category_people"/>
<PreferenceCategory
android:title="@string/mode_interruption_filter_title"
android:key="modes_filters">
<Preference
android:key="zen_mode_people"
android:title="@string/zen_category_people"/>
<Preference
android:key="zen_other_settings"
android:title="@string/zen_category_exceptions" />
<Preference
android:key="zen_other_settings"
android:title="@string/zen_category_exceptions" />
</PreferenceCategory>
<PreferenceCategory
android:title="@string/mode_device_effects_title"
android:key="modes_additional_actions">
<Preference
android:key="mode_display_settings"
android:title="@string/mode_display_settings_title" />
</PreferenceCategory>
</PreferenceScreen>