Add the new content protection preference option and subpage in Settings -> Security & privacy -> More security & privacy settings.

Bug: 302189945
Test: robotests
m -j256 Settings
atest SettingsRoboTests:ContentProtectionPreferenceControllerTest
atest SettingsRoboTests:ContentProtectionPreferenceFragmentTest

Change-Id: I620d73f8674c1340f9b11cd910620f1d5afb0ec1
This commit is contained in:
Wa Gao
2023-10-07 00:15:17 +00:00
parent db679c9100
commit c80dfbccb6
8 changed files with 511 additions and 1 deletions

View File

@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2023 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"
android:title="@string/content_protection_preference_title">
<com.android.settingslib.widget.TopIntroPreference
android:key="content_protection_preference_top_intro"
android:title="@string/content_protection_preference_subpage_summary"
settings:searchable="false"/>
<com.android.settings.widget.SettingsMainSwitchPreference
android:key="content_protection_preference_user_consent_switch"
android:title="@string/content_protection_preference_user_consent_switch_title"
settings:controller=
"com.android.settings.security.ContentProtectionTogglePreferenceController"/>
<com.android.settingslib.widget.IllustrationPreference
android:key="content_protection_preference_subpage_illustration"
android:selectable="false"
settings:lottie_rawRes="@drawable/content_protection_preference_illustration"
settings:searchable="false" />
<SwitchPreference
android:key="content_protection_preference_user_consent_work_profile_switch"
android:title="@string/content_protection_preference_user_consent_work_profile_switch_title"
settings:isPreferenceVisible="false" />
<com.android.settingslib.widget.FooterPreference
android:key="content_protection_preference_subpage_footer"
android:title="@string/content_protection_preference_subpage_info" />
</PreferenceScreen>