This change allows the combined preference controller to be a central place to manage dependencies between the global switch and the individual type checkboxes. When the last individual checkbox is unchecked, the global switch turns off as well. When the global switch is flipped, the individual type preferences become visible or invisible. Flag: android.service.notification.notification_classification Bug: 380291070 Test: atest BundleCombinedPreferenceControllerTest, manual Change-Id: I4e97d3d999c6114dd8c71100a0b0de1eb8f94e31
82 lines
3.3 KiB
XML
82 lines
3.3 KiB
XML
<?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"
|
|
xmlns:settings="http://schemas.android.com/apk/res-auto"
|
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
android:title="@string/notification_bundle_title">
|
|
|
|
<com.android.settingslib.widget.IllustrationPreference
|
|
android:key="illustration"
|
|
settings:searchable="false"
|
|
android:selectable="false"
|
|
app:lottie_cacheComposition="false"
|
|
settings:dynamicColor="true"/>
|
|
|
|
<com.android.settingslib.widget.TopIntroPreference
|
|
android:key="feature_description"
|
|
settings:searchable="false"
|
|
android:title="@string/notification_bundle_description"/>
|
|
|
|
<PreferenceCategory
|
|
android:key="enabled_settings">
|
|
|
|
<com.android.settingslib.widget.MainSwitchPreference
|
|
android:key="global_pref"
|
|
android:title="@string/notification_bundle_main_control_title" />
|
|
|
|
<CheckBoxPreference
|
|
android:key="promotions"
|
|
android:title="@*android:string/promotional_notification_channel_label"/>
|
|
|
|
<CheckBoxPreference
|
|
android:key="news"
|
|
android:title="@*android:string/news_notification_channel_label"/>
|
|
|
|
<CheckBoxPreference
|
|
android:key="social"
|
|
android:title="@*android:string/social_notification_channel_label"/>
|
|
|
|
<CheckBoxPreference
|
|
android:key="recs"
|
|
android:title="@*android:string/recs_notification_channel_label" />
|
|
</PreferenceCategory>
|
|
|
|
<PreferenceCategory
|
|
android:key="notification_bundle_excluded_apps_list"
|
|
android:title="@string/notification_excluded_apps"
|
|
settings:controller="com.android.settings.notification.AdjustmentExcludedAppsPreferenceController">
|
|
<com.android.settingslib.widget.TopIntroPreference
|
|
android:key="excluded_description"
|
|
android:title="@string/notification_bundle_excluded_description"/>
|
|
|
|
<!-- apps are added here -->
|
|
|
|
<Preference
|
|
android:key="notification_bundle_manage_apps"
|
|
android:order="1000"
|
|
android:icon="@drawable/ic_chevron_right_24dp"
|
|
android:title="@string/notification_summarization_manage_excluded_apps"
|
|
settings:controller="com.android.settings.notification.BundleManageAppsPreferenceController"
|
|
android:fragment="com.android.settings.applications.manageapplications.ManageApplications">
|
|
<extra
|
|
android:name="classname"
|
|
android:value="com.android.settings.Settings$NotificationExcludeClassificationActivity"/>
|
|
</Preference>
|
|
</PreferenceCategory>
|
|
</PreferenceScreen>
|