Add keys to all Preferences on the Managed device info page
In order to be able to hide the page from search results, all Preferences
(and PreferenceCategories) must have android:keys.
Bug: 62285529
Test: The Settings framework will have a test that ensure each Preference
Test: has a key from O-DR onward
Change-Id: I1e41ce6f8b9f90155ef92354b9268e9e720e1e73
diff --git a/res/xml/enterprise_privacy_settings.xml b/res/xml/enterprise_privacy_settings.xml
index 2d07fa2..13f7b8e 100644
--- a/res/xml/enterprise_privacy_settings.xml
+++ b/res/xml/enterprise_privacy_settings.xml
@@ -20,19 +20,23 @@
android:title="@string/enterprise_privacy_settings">
<!-- Header -->
- <Preference
- android:icon="@drawable/ic_info_outline_24dp"
- android:summary="@string/enterprise_privacy_header"
- android:selectable="false"/>
+ <Preference android:key="enterprise_privacy_header"
+ android:icon="@drawable/ic_info_outline_24dp"
+ android:summary="@string/enterprise_privacy_header"
+ android:selectable="false"/>
- <PreferenceCategory android:title="@string/enterprise_privacy_exposure_category"
+ <PreferenceCategory android:key="exposure_category"
+ android:title="@string/enterprise_privacy_exposure_category"
android:contentDescription="@string/enterprise_privacy_exposure_category">
- <Preference android:layout_height="wrap_content"
+ <Preference android:key="enterprise_privacy_enterprise_data"
+ android:layout_height="wrap_content"
android:title="@string/enterprise_privacy_enterprise_data"
android:selectable="false"/>
- <Preference android:title="@string/enterprise_privacy_installed_packages"
+ <Preference android:key="enterprise_privacy_installed_packages"
+ android:title="@string/enterprise_privacy_installed_packages"
android:selectable="false"/>
- <Preference android:title="@string/enterprise_privacy_usage_stats"
+ <Preference android:key="enterprise_privacy_usage_stats"
+ android:title="@string/enterprise_privacy_usage_stats"
android:selectable="false"/>
<Preference android:key="network_logs"
android:title="@string/enterprise_privacy_network_logs"
@@ -78,10 +82,13 @@
android:selectable="false"/>
</PreferenceCategory>
- <PreferenceCategory android:title="@string/enterprise_privacy_device_access_category">
- <Preference android:title="@string/enterprise_privacy_lock_device"
+ <PreferenceCategory android:key="device_access_category"
+ android:title="@string/enterprise_privacy_device_access_category">
+ <Preference android:key="enterprise_privacy_lock_device"
+ android:title="@string/enterprise_privacy_lock_device"
android:selectable="false"/>
- <Preference android:title="@string/enterprise_privacy_wipe_device"
+ <Preference android:key="enterprise_privacy_wipe_device"
+ android:title="@string/enterprise_privacy_wipe_device"
android:selectable="false"/>
<Preference android:key="failed_password_wipe_current_user"
android:title="@string/enterprise_privacy_failed_password_wipe_device"