Misc clean up in search
- Remove updateFromClassNameResource() because it's just a no-op method. - Simplify SearchIndexResources - Update some pref pages to have unique keys. Change-Id: I51e542d9947aafd046861ce7be0b4c7213fcd01d Fixes: 64951285 Test: UniquePreferenceKeyTest Test: robotest Bug: 67852637
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
-->
|
||||
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:key="accessibility_settings_screen"
|
||||
android:title="@string/accessibility_settings"
|
||||
android:persistent="true">
|
||||
|
||||
|
@@ -16,11 +16,13 @@
|
||||
-->
|
||||
|
||||
<PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:title="@string/ambient_display_screen_title">
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:key="ambient_display_preference_screen"
|
||||
android:title="@string/ambient_display_screen_title">
|
||||
|
||||
<PreferenceCategory
|
||||
android:title="@string/ambient_display_category_triggers">
|
||||
android:key="ambient_display_category_when_to_show"
|
||||
android:title="@string/ambient_display_category_triggers">
|
||||
|
||||
<SwitchPreference
|
||||
android:key="ambient_display_always_on"
|
||||
@@ -39,7 +41,8 @@
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory>
|
||||
<PreferenceCategory
|
||||
android:key="ambient_display_category_notification">
|
||||
|
||||
<SwitchPreference
|
||||
android:key="ambient_display_notification"
|
||||
|
@@ -18,6 +18,7 @@
|
||||
<PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
|
||||
android:key="apps_and_notification_screen"
|
||||
android:title="@string/app_and_notification_dashboard_title">
|
||||
|
||||
<PreferenceCategory
|
||||
|
@@ -18,6 +18,7 @@
|
||||
<PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
|
||||
android:key="app_default_settings_screen"
|
||||
android:title="@string/app_default_dashboard_title">
|
||||
|
||||
<Preference
|
||||
|
@@ -16,6 +16,7 @@
|
||||
|
||||
<PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:key="connected_devices_screen"
|
||||
android:title="@string/connected_devices_dashboard_title">
|
||||
|
||||
<com.android.settings.widget.MasterSwitchPreference
|
||||
|
@@ -14,11 +14,14 @@
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:settings="http://schemas.android.com/apk/res-auto"
|
||||
android:key="data_usage_screen"
|
||||
android:title="@string/data_usage_summary_title">
|
||||
|
||||
<PreferenceCategory
|
||||
android:key="data_usage_category"
|
||||
android:title="@string/usage">
|
||||
|
||||
<com.android.settings.SummaryPreference
|
||||
|
@@ -16,6 +16,7 @@
|
||||
|
||||
<PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:key="data_usage_cellular_screen"
|
||||
android:title="@string/data_usage_summary_title">
|
||||
|
||||
<com.android.settings.datausage.TemplatePreferenceCategory
|
||||
|
@@ -16,6 +16,7 @@
|
||||
|
||||
<PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:key="data_usage_wifi_screen"
|
||||
android:title="@string/data_usage_summary_title">
|
||||
|
||||
<com.android.settings.datausage.TemplatePreferenceCategory
|
||||
|
@@ -17,6 +17,7 @@
|
||||
<PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
|
||||
android:key="date_time_settings_screen"
|
||||
android:title="@string/date_and_time"
|
||||
settings:keywords="@string/keywords_date_and_time">
|
||||
|
||||
|
@@ -15,6 +15,7 @@
|
||||
-->
|
||||
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:key="device_info_pref_screen"
|
||||
android:title="@string/about_settings">
|
||||
|
||||
<!-- System update settings - launches activity -->
|
||||
|
@@ -16,6 +16,7 @@
|
||||
|
||||
<PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:key="device_status_screen"
|
||||
android:title="@string/device_status_activity_title">
|
||||
|
||||
<Preference
|
||||
|
@@ -17,6 +17,7 @@
|
||||
<PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
|
||||
android:key="display_settings_screen"
|
||||
android:title="@string/display_settings"
|
||||
settings:keywords="@string/keywords_display">
|
||||
|
||||
|
@@ -15,9 +15,11 @@
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:title="@string/double_tap_power_for_camera_title">
|
||||
<PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:key="gesture_double_tap_power_screen"
|
||||
android:title="@string/double_tap_power_for_camera_title">
|
||||
|
||||
<com.android.settings.widget.VideoPreference
|
||||
android:key="gesture_double_tap_power_video"
|
||||
|
@@ -15,19 +15,21 @@
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:title="@string/ambient_display_title">
|
||||
<PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:key="gesture_double_tap_screen_screen"
|
||||
android:title="@string/ambient_display_title">
|
||||
|
||||
<com.android.settings.widget.VideoPreference
|
||||
android:key="gesture_double_tap_screen_video"
|
||||
app:animation="@raw/gesture_ambient_tap"
|
||||
app:preview="@drawable/gesture_ambient_tap"/>
|
||||
app:preview="@drawable/gesture_ambient_tap" />
|
||||
|
||||
<SwitchPreference
|
||||
android:key="gesture_double_tap_screen"
|
||||
android:title="@string/ambient_display_title"
|
||||
android:summary="@string/ambient_display_summary"
|
||||
app:keywords="@string/keywords_gesture"/>
|
||||
app:keywords="@string/keywords_gesture" />
|
||||
|
||||
</PreferenceScreen>
|
@@ -15,19 +15,21 @@
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:title="@string/double_twist_for_camera_mode_title">
|
||||
<PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:key="gesture_double_twist_screen"
|
||||
android:title="@string/double_twist_for_camera_mode_title">
|
||||
|
||||
<com.android.settings.widget.VideoPreference
|
||||
android:key="gesture_double_twist_video"
|
||||
app:animation="@raw/gesture_twist"
|
||||
app:preview="@drawable/gesture_twist"/>
|
||||
app:preview="@drawable/gesture_twist" />
|
||||
|
||||
<SwitchPreference
|
||||
android:key="gesture_double_twist"
|
||||
android:title="@string/double_twist_for_camera_mode_title"
|
||||
android:summary="@string/double_twist_for_camera_mode_summary"
|
||||
app:keywords="@string/keywords_gesture"/>
|
||||
app:keywords="@string/keywords_gesture" />
|
||||
|
||||
</PreferenceScreen>
|
@@ -16,7 +16,7 @@
|
||||
|
||||
<PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
|
||||
android:key="dream_overview_screen"
|
||||
android:title="@string/screensaver_settings_title" >
|
||||
|
||||
<com.android.settings.widget.GearPreference
|
||||
@@ -31,7 +31,8 @@
|
||||
|
||||
|
||||
<!-- Layout preference doesn't obey allowDividerAbove, so put it in a PreferenceCategory -->
|
||||
<PreferenceCategory>
|
||||
<PreferenceCategory
|
||||
android:key="dream_start_now_category">
|
||||
<com.android.settings.applications.LayoutPreference
|
||||
android:key="dream_start_now_button_container"
|
||||
android:selectable="false"
|
||||
|
@@ -17,6 +17,7 @@
|
||||
|
||||
<PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:key="gesture_settings_screen"
|
||||
android:title="@string/gesture_preference_title" >
|
||||
|
||||
<Preference
|
||||
|
@@ -18,6 +18,7 @@
|
||||
<PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
|
||||
android:key="language_and_input_settings_screen"
|
||||
android:title="@string/language_settings" >
|
||||
|
||||
<Preference
|
||||
@@ -27,6 +28,7 @@
|
||||
android:fragment="com.android.settings.localepicker.LocaleListEditor"/>
|
||||
|
||||
<PreferenceCategory
|
||||
android:key="keyboards_category"
|
||||
android:title="@string/keyboard_and_input_methods_category">
|
||||
<Preference
|
||||
android:key="virtual_keyboard_pref"
|
||||
@@ -40,6 +42,7 @@
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory
|
||||
android:key="input_assistance_category"
|
||||
android:title="@string/input_assistance">
|
||||
<!-- Spell checker preference title, summary and fragment will be set programmatically. -->
|
||||
<!-- Note: Mark this as persistent="false" to remove unnecessarily saved shared preference.
|
||||
@@ -62,7 +65,8 @@
|
||||
android:title="@string/user_dict_settings_title"/>
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory>
|
||||
<PreferenceCategory
|
||||
android:key="pointer_and_tts_category">
|
||||
|
||||
<com.android.settings.PointerSpeedPreference
|
||||
android:key="pointer_speed"
|
||||
|
@@ -29,6 +29,7 @@
|
||||
android:fragment="com.android.settings.localepicker.LocaleListEditor"/>
|
||||
|
||||
<PreferenceCategory
|
||||
android:key="keyboards_category"
|
||||
android:title="@string/keyboard_and_input_methods_category">
|
||||
<Preference
|
||||
android:key="virtual_keyboard_pref"
|
||||
@@ -42,6 +43,7 @@
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory
|
||||
android:key="input_assistance_category"
|
||||
android:title="@string/input_assistance">
|
||||
<!-- Spell checker preference title, summary and fragment will be set programmatically. -->
|
||||
<!-- Note: Mark this as persistent="false" to remove unnecessarily saved shared preference.
|
||||
@@ -64,7 +66,8 @@
|
||||
android:title="@string/user_dict_settings_title"/>
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory>
|
||||
<PreferenceCategory
|
||||
android:key="pointer_and_tts_category">
|
||||
|
||||
<com.android.settings.PointerSpeedPreference
|
||||
android:key="pointer_speed"
|
||||
|
@@ -17,6 +17,7 @@
|
||||
|
||||
<PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:key="manage_assist_screen"
|
||||
android:title="@string/assist_and_voice_input_title">
|
||||
|
||||
<com.android.settings.widget.GearPreference
|
||||
|
@@ -17,6 +17,7 @@
|
||||
<PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
|
||||
android:key="network_and_internet_screen"
|
||||
android:title="@string/network_dashboard_title">
|
||||
|
||||
<com.android.settings.widget.MasterSwitchPreference
|
||||
@@ -28,7 +29,7 @@
|
||||
android:order="-30">
|
||||
<intent
|
||||
android:action="android.settings.WIFI_SETTINGS"
|
||||
android:targetClass="Settings$WifiSettingsActivity"/>
|
||||
android:targetClass="Settings$WifiSettingsActivity" />
|
||||
</com.android.settings.widget.MasterSwitchPreference>
|
||||
|
||||
<com.android.settingslib.RestrictedPreference
|
||||
@@ -44,7 +45,7 @@
|
||||
<intent
|
||||
android:action="android.intent.action.MAIN"
|
||||
android:targetPackage="com.android.phone"
|
||||
android:targetClass="com.android.phone.MobileNetworkSettings"/>
|
||||
android:targetClass="com.android.phone.MobileNetworkSettings" />
|
||||
</com.android.settingslib.RestrictedPreference>
|
||||
|
||||
<com.android.settingslib.RestrictedPreference
|
||||
@@ -55,7 +56,7 @@
|
||||
android:order="-5"
|
||||
android:summary="@string/summary_placeholder"
|
||||
settings:userRestriction="no_config_tethering"
|
||||
settings:useAdminDisabledSummary="true"/>
|
||||
settings:useAdminDisabledSummary="true" />
|
||||
|
||||
<com.android.settingslib.RestrictedPreference
|
||||
android:fragment="com.android.settings.vpn2.VpnSettings"
|
||||
@@ -65,25 +66,25 @@
|
||||
android:order="0"
|
||||
android:summary="@string/summary_placeholder"
|
||||
settings:userRestriction="no_config_vpn"
|
||||
settings:useAdminDisabledSummary="true"/>
|
||||
settings:useAdminDisabledSummary="true" />
|
||||
|
||||
<com.android.settingslib.RestrictedPreference
|
||||
android:key="manage_mobile_plan"
|
||||
android:title="@string/manage_mobile_plan_title"
|
||||
android:persistent="false"
|
||||
settings:userRestriction="no_config_mobile_networks"
|
||||
settings:useAdminDisabledSummary="true"/>
|
||||
settings:useAdminDisabledSummary="true" />
|
||||
|
||||
<SwitchPreference
|
||||
android:key="toggle_airplane"
|
||||
android:title="@string/airplane_mode"
|
||||
android:icon="@drawable/ic_airplanemode_active"
|
||||
android:disableDependentsState="true"
|
||||
android:order="5"/>
|
||||
android:order="5" />
|
||||
|
||||
<Preference
|
||||
android:fragment="com.android.settings.ProxySelector"
|
||||
android:key="proxy_settings"
|
||||
android:title="@string/proxy_settings_title"/>
|
||||
android:title="@string/proxy_settings_title" />
|
||||
|
||||
</PreferenceScreen>
|
@@ -13,7 +13,9 @@
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:key="physical_keyboard_screen"
|
||||
android:title="@string/physical_keyboard_title">
|
||||
<!-- Additional preference screens are inserted here programmatically
|
||||
with low order values to set the key map of each attached keyboard. -->
|
||||
|
@@ -17,6 +17,7 @@
|
||||
<PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
|
||||
android:key="power_usage_advanced_screen"
|
||||
android:title="@string/advanced_battery_title"
|
||||
settings:keywords="@string/keywords_battery">
|
||||
|
||||
|
@@ -17,6 +17,7 @@
|
||||
<PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
|
||||
android:key="power_usage_summary_screen"
|
||||
android:title="@string/power_usage_summary_title"
|
||||
settings:keywords="@string/keywords_battery">
|
||||
|
||||
|
@@ -14,21 +14,21 @@
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
|
||||
<PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
|
||||
android:key="print_settings_screen"
|
||||
android:title="@string/print_settings_title"
|
||||
settings:keywords="@string/keywords_printing">
|
||||
|
||||
<PreferenceCategory
|
||||
android:key="print_jobs_category"
|
||||
android:title="@string/print_print_jobs"
|
||||
android:order="0" />
|
||||
|
||||
<PreferenceCategory
|
||||
android:key="print_services_category"
|
||||
android:title="@string/print_settings_title"
|
||||
settings:keywords="@string/keywords_printing">
|
||||
|
||||
<PreferenceCategory
|
||||
android:key="print_jobs_category"
|
||||
android:title="@string/print_print_jobs"
|
||||
android:order="0">
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory
|
||||
android:key="print_services_category"
|
||||
android:title="@string/print_settings_title"
|
||||
android:order="1">
|
||||
</PreferenceCategory>
|
||||
android:order="1" />
|
||||
|
||||
</PreferenceScreen>
|
||||
|
@@ -16,6 +16,7 @@
|
||||
|
||||
<PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:key="security_lockscreen_settings_screen"
|
||||
android:title="@string/lockscreen_settings_title">
|
||||
|
||||
<com.android.settings.notification.RestrictedDropDownPreference
|
||||
|
@@ -16,6 +16,7 @@
|
||||
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
|
||||
android:key="security_settings_chooser_screen"
|
||||
android:title="@string/security_settings_title">
|
||||
|
||||
<PreferenceCategory
|
||||
|
@@ -15,6 +15,7 @@
|
||||
-->
|
||||
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:key="security_settings_encrypted_screen"
|
||||
android:title="@string/security_settings_title">
|
||||
|
||||
<PreferenceCategory
|
||||
|
@@ -16,6 +16,7 @@
|
||||
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
|
||||
android:key="security_settings_lockscreen_screen"
|
||||
android:title="@string/security_settings_title">
|
||||
|
||||
<PreferenceCategory
|
||||
|
@@ -16,6 +16,7 @@
|
||||
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
|
||||
android:key="security_settings_lockscreen_profile_screen"
|
||||
android:title="@string/security_settings_title">
|
||||
|
||||
<com.android.settingslib.RestrictedPreference
|
||||
|
@@ -15,10 +15,12 @@
|
||||
-->
|
||||
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:key="security_settings_misc_screen"
|
||||
android:title="@string/security_settings_title">
|
||||
|
||||
<PreferenceCategory android:title="@string/security_passwords_title"
|
||||
android:persistent="false">
|
||||
<PreferenceCategory
|
||||
android:key="security_settings_misc_category"
|
||||
android:title="@string/security_passwords_title">
|
||||
|
||||
<Preference
|
||||
android:key="location"
|
||||
@@ -33,7 +35,8 @@
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory>
|
||||
<PreferenceCategory
|
||||
android:key="security_settings_device_admin_category">
|
||||
|
||||
<Preference android:key="manage_device_admin"
|
||||
android:title="@string/manage_device_admin"
|
||||
|
@@ -16,6 +16,7 @@
|
||||
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
|
||||
android:key="security_settings_password_screen"
|
||||
android:title="@string/lock_settings_picker_title">
|
||||
|
||||
<PreferenceCategory
|
||||
|
@@ -16,6 +16,7 @@
|
||||
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
|
||||
android:key="security_settings_password_profile_screen"
|
||||
android:title="@string/security_settings_title">
|
||||
|
||||
<com.android.settingslib.RestrictedPreference
|
||||
|
@@ -17,6 +17,7 @@
|
||||
|
||||
<PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:key="security_settings_password_sub_screen"
|
||||
android:title="@string/settings_label">
|
||||
|
||||
<com.android.settings.TimeoutListPreference
|
||||
|
@@ -16,6 +16,7 @@
|
||||
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
|
||||
android:key="security_settings_pattern_screen"
|
||||
android:title="@string/lock_settings_picker_title">
|
||||
|
||||
<PreferenceCategory
|
||||
|
@@ -16,6 +16,7 @@
|
||||
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
|
||||
android:key="security_settings_pattern_profile_screen"
|
||||
android:title="@string/security_settings_title">
|
||||
|
||||
<com.android.settingslib.RestrictedPreference
|
||||
|
@@ -17,6 +17,7 @@
|
||||
|
||||
<PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:key="security_settings_pattern_sub_screen"
|
||||
android:title="@string/settings_label">
|
||||
|
||||
<SwitchPreference
|
||||
|
@@ -16,6 +16,7 @@
|
||||
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
|
||||
android:key="security_settings_pin_profile_screen"
|
||||
android:title="@string/security_settings_title">
|
||||
|
||||
<com.android.settingslib.RestrictedPreference
|
||||
|
@@ -17,6 +17,7 @@
|
||||
|
||||
<PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:key="security_settings_pin_sub_screen"
|
||||
android:title="@string/settings_label">
|
||||
|
||||
<com.android.settings.TimeoutListPreference
|
||||
|
@@ -17,6 +17,7 @@
|
||||
|
||||
<PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:key="security_settings_slide_sub_screen"
|
||||
android:title="@string/settings_label">
|
||||
|
||||
<com.android.settingslib.RestrictedPreference
|
||||
|
@@ -15,6 +15,7 @@
|
||||
-->
|
||||
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:key="security_settings_unencrypted_screen"
|
||||
android:title="@string/crypt_keeper_settings_title">
|
||||
|
||||
<PreferenceCategory
|
||||
|
@@ -22,6 +22,7 @@
|
||||
settings:keywords="@string/keywords_sounds">
|
||||
|
||||
<PreferenceCategory
|
||||
android:key="sound_settings_primary_items_category"
|
||||
android:order="-100">
|
||||
<!-- Media volume -->
|
||||
<com.android.settings.notification.VolumeSeekBarPreference
|
||||
@@ -93,6 +94,7 @@
|
||||
|
||||
<!-- Other sounds -->
|
||||
<PreferenceCategory
|
||||
android:key="other_sounds_and_vibrations_category"
|
||||
android:title="@string/other_sound_category_preference_title"
|
||||
android:order="-50">
|
||||
|
||||
|
@@ -17,6 +17,7 @@
|
||||
<PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
|
||||
android:key="special_app_access_screen"
|
||||
android:title="@string/special_access">
|
||||
|
||||
<Preference
|
||||
|
@@ -17,6 +17,7 @@
|
||||
<PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
|
||||
android:key="storage_dashboard_screen"
|
||||
android:title="@string/storage_settings"
|
||||
android:orderingFromXml="false">
|
||||
<com.android.settings.deviceinfo.storage.StorageSummaryDonutPreference
|
||||
|
@@ -17,6 +17,7 @@
|
||||
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:key="gesture_swipe_down_fingerprint_screen"
|
||||
android:title="@string/fingerprint_gesture_screen_title">
|
||||
|
||||
<com.android.settings.widget.VideoPreference
|
||||
|
@@ -16,6 +16,7 @@
|
||||
|
||||
<PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:key="system_dashboard_screen"
|
||||
android:title="@string/header_category_system">
|
||||
|
||||
<Preference
|
||||
|
@@ -16,6 +16,7 @@
|
||||
|
||||
<PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:key="tts_settings_screen"
|
||||
android:title="@string/tts_settings_title">
|
||||
|
||||
<PreferenceCategory android:key="tts_engine_section">
|
||||
|
@@ -17,6 +17,7 @@
|
||||
<PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
|
||||
android:key="user_and_account_settings_screen"
|
||||
android:title="@string/account_dashboard_title"
|
||||
settings:keywords="@string/keywords_accounts">
|
||||
|
||||
|
@@ -13,7 +13,9 @@
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:key="virtual_keyboard_category"
|
||||
android:title="@string/virtual_keyboard_category">
|
||||
<!-- Enabled input method list will be populated programmatically here. -->
|
||||
<Preference
|
||||
|
@@ -17,6 +17,7 @@
|
||||
<PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
|
||||
android:key="wifi_configure_settings_screen"
|
||||
android:title="@string/wifi_configure_settings_preference_title">
|
||||
|
||||
<SwitchPreference
|
||||
|
@@ -17,7 +17,6 @@
|
||||
package com.android.settings;
|
||||
|
||||
import static android.provider.Settings.System.SCREEN_OFF_TIMEOUT;
|
||||
|
||||
import static com.android.settingslib.RestrictedLockUtils.EnforcedAdmin;
|
||||
|
||||
import android.app.Activity;
|
||||
@@ -382,14 +381,6 @@ public class SecuritySettings extends SettingsPreferenceFragment
|
||||
// Advanced Security features
|
||||
initTrustAgentPreference(root, numberOfTrustAgent);
|
||||
|
||||
// The above preferences come and go based on security state, so we need to update
|
||||
// the index. This call is expected to be fairly cheap, but we may want to do something
|
||||
// smarter in the future.
|
||||
final Activity activity = getActivity();
|
||||
FeatureFactory.getFactory(activity).getSearchFeatureProvider().getIndexingManager(activity)
|
||||
.updateFromClassNameResource(SecuritySettings.class.getName(),
|
||||
true /* includeInSearchResults */);
|
||||
|
||||
PreferenceGroup securityStatusPreferenceGroup =
|
||||
(PreferenceGroup) root.findPreference(KEY_SECURITY_STATUS);
|
||||
final List<Preference> tilePrefs = mDashboardFeatureProvider.getPreferencesForCategory(
|
||||
|
@@ -54,7 +54,6 @@ import com.android.settings.Utils;
|
||||
import com.android.settings.core.PreferenceControllerMixin;
|
||||
import com.android.settings.core.instrumentation.MetricsFeatureProvider;
|
||||
import com.android.settings.overlay.FeatureFactory;
|
||||
import com.android.settings.search.SearchFeatureProviderImpl;
|
||||
import com.android.settings.search.SearchIndexableRaw;
|
||||
import com.android.settingslib.RestrictedPreference;
|
||||
import com.android.settingslib.accounts.AuthenticatorHelper;
|
||||
@@ -346,8 +345,6 @@ public class AccountPreferenceController extends AbstractPreferenceController
|
||||
DISALLOW_MODIFY_ACCOUNTS, userInfo.id);
|
||||
}
|
||||
mProfiles.put(userInfo.id, profileData);
|
||||
new SearchFeatureProviderImpl().getIndexingManager(mContext).updateFromClassNameResource(
|
||||
UserAndAccountDashboardFragment.class.getName(), true /* includeInSearchResults */);
|
||||
}
|
||||
|
||||
private DimmableIconPreference newAddAccountPreference(Context context) {
|
||||
|
@@ -20,7 +20,6 @@ import static android.provider.Settings.EXTRA_AUTHORITIES;
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.pm.UserInfo;
|
||||
import android.os.Bundle;
|
||||
import android.os.UserHandle;
|
||||
import android.os.UserManager;
|
||||
import android.provider.SearchIndexableResource;
|
||||
@@ -31,7 +30,6 @@ import com.android.settings.dashboard.DashboardFragment;
|
||||
import com.android.settings.dashboard.SummaryLoader;
|
||||
import com.android.settings.search.BaseSearchIndexProvider;
|
||||
import com.android.settingslib.core.AbstractPreferenceController;
|
||||
import com.android.settingslib.drawer.Tile;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
@@ -40,7 +38,6 @@ import java.util.List;
|
||||
public class UserAndAccountDashboardFragment extends DashboardFragment {
|
||||
|
||||
private static final String TAG = "UserAndAccountDashboard";
|
||||
private static final String METADATA_IA_ACCOUNT = "com.android.settings.ia.account";
|
||||
|
||||
@Override
|
||||
public int getMetricsCategory() {
|
||||
|
@@ -18,20 +18,18 @@
|
||||
package com.android.settings.search;
|
||||
|
||||
import static com.android.settings.search.DatabaseResultLoader.COLUMN_INDEX_ID;
|
||||
import static com.android.settings.search.DatabaseResultLoader
|
||||
.COLUMN_INDEX_INTENT_ACTION_TARGET_PACKAGE;
|
||||
import static com.android.settings.search.DatabaseResultLoader.COLUMN_INDEX_INTENT_ACTION_TARGET_PACKAGE;
|
||||
import static com.android.settings.search.DatabaseResultLoader.COLUMN_INDEX_KEY;
|
||||
import static com.android.settings.search.DatabaseResultLoader.SELECT_COLUMNS;
|
||||
import static com.android.settings.search.IndexDatabaseHelper.IndexColumns.DOCID;
|
||||
import static com.android.settings.search.IndexDatabaseHelper.IndexColumns.CLASS_NAME;
|
||||
import static com.android.settings.search.IndexDatabaseHelper.IndexColumns.DATA_ENTRIES;
|
||||
import static com.android.settings.search.IndexDatabaseHelper.IndexColumns.DATA_KEYWORDS;
|
||||
import static com.android.settings.search.IndexDatabaseHelper.IndexColumns.DATA_KEY_REF;
|
||||
import static com.android.settings.search.IndexDatabaseHelper.IndexColumns.DATA_SUMMARY_ON;
|
||||
import static com.android.settings.search.IndexDatabaseHelper.IndexColumns
|
||||
.DATA_SUMMARY_ON_NORMALIZED;
|
||||
import static com.android.settings.search.IndexDatabaseHelper.IndexColumns.DATA_SUMMARY_ON_NORMALIZED;
|
||||
import static com.android.settings.search.IndexDatabaseHelper.IndexColumns.DATA_TITLE;
|
||||
import static com.android.settings.search.IndexDatabaseHelper.IndexColumns.DATA_TITLE_NORMALIZED;
|
||||
import static com.android.settings.search.IndexDatabaseHelper.IndexColumns.DOCID;
|
||||
import static com.android.settings.search.IndexDatabaseHelper.IndexColumns.ENABLED;
|
||||
import static com.android.settings.search.IndexDatabaseHelper.IndexColumns.ICON;
|
||||
import static com.android.settings.search.IndexDatabaseHelper.IndexColumns.INTENT_ACTION;
|
||||
@@ -53,14 +51,12 @@ import android.database.sqlite.SQLiteDatabase;
|
||||
import android.database.sqlite.SQLiteException;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Build;
|
||||
import android.provider.SearchIndexableResource;
|
||||
import android.provider.SearchIndexablesContract;
|
||||
import android.support.annotation.VisibleForTesting;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
import com.android.settings.overlay.FeatureFactory;
|
||||
|
||||
import com.android.settings.search.indexing.IndexData;
|
||||
import com.android.settings.search.indexing.IndexDataConverter;
|
||||
import com.android.settings.search.indexing.PreIndexData;
|
||||
@@ -365,36 +361,6 @@ public class DatabaseIndexingManager {
|
||||
disabledResults.close();
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO (b/64951285): Deprecate this method
|
||||
*
|
||||
* Update the Index for a specific class name resources
|
||||
*
|
||||
* @param className the class name (typically a fragment name).
|
||||
* @param includeInSearchResults true means that you want the bit "enabled" set so that the
|
||||
* data will be seen included into the search results
|
||||
*/
|
||||
public void updateFromClassNameResource(String className, boolean includeInSearchResults) {
|
||||
if (className == null) {
|
||||
throw new IllegalArgumentException("class name cannot be null!");
|
||||
}
|
||||
final SearchIndexableResource res = SearchIndexableResources.getResourceByName(className);
|
||||
if (res == null) {
|
||||
Log.e(LOG_TAG, "Cannot find SearchIndexableResources for class name: " + className);
|
||||
return;
|
||||
}
|
||||
res.context = mContext;
|
||||
res.enabled = includeInSearchResults;
|
||||
AsyncTask.execute(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
// addIndexableData(res);
|
||||
// updateDatabase(false, Locale.getDefault().toString());
|
||||
// res.enabled = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private SQLiteDatabase getWritableDatabase() {
|
||||
try {
|
||||
return IndexDatabaseHelper.getInstance(mContext).getWritableDatabase();
|
||||
|
@@ -19,7 +19,6 @@ package com.android.settings.search;
|
||||
import android.provider.SearchIndexableResource;
|
||||
import android.support.annotation.VisibleForTesting;
|
||||
import android.support.annotation.XmlRes;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.android.settings.DateTimeSettings;
|
||||
import com.android.settings.DeviceInfoSettings;
|
||||
@@ -92,13 +91,6 @@ import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
|
||||
public final class SearchIndexableResources {
|
||||
|
||||
/**
|
||||
* Identifies subsettings which have an {@link SearchIndexableResource#intentAction} but
|
||||
* whose intents should still be treated as subsettings inside of Settings.
|
||||
*/
|
||||
public static final String SUBSETTING_TARGET_PACKAGE = "subsetting_target_package";
|
||||
|
||||
@XmlRes
|
||||
public static final int NO_RES_ID = 0;
|
||||
|
||||
@@ -107,20 +99,10 @@ public final class SearchIndexableResources {
|
||||
|
||||
@VisibleForTesting
|
||||
static void addIndex(Class<?> indexClass) {
|
||||
addIndex(indexClass, null /* targetAction */);
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
static void addIndex(Class<?> indexClass, String targetAction) {
|
||||
String className = indexClass.getName();
|
||||
SearchIndexableResource resource = new SearchIndexableResource(
|
||||
0 /* rank */, NO_RES_ID, className, NO_RES_ID);
|
||||
|
||||
if (!TextUtils.isEmpty(targetAction)) {
|
||||
resource.intentAction = targetAction;
|
||||
resource.intentTargetPackage = SUBSETTING_TARGET_PACKAGE;
|
||||
}
|
||||
|
||||
sResMap.put(className, resource);
|
||||
}
|
||||
|
||||
@@ -133,11 +115,11 @@ public final class SearchIndexableResources {
|
||||
addIndex(DataUsageSummary.class);
|
||||
addIndex(DataUsageMeteredSettings.class);
|
||||
addIndex(ScreenZoomSettings.class);
|
||||
addIndex(DisplaySettings.class, "android.settings.DISPLAY_SETTINGS");
|
||||
addIndex(DisplaySettings.class);
|
||||
addIndex(AmbientDisplaySettings.class);
|
||||
addIndex(WallpaperTypeSettings.class);
|
||||
addIndex(AppAndNotificationDashboardFragment.class);
|
||||
addIndex(SoundSettings.class, "android.settings.SOUND_SETTINGS");
|
||||
addIndex(SoundSettings.class);
|
||||
addIndex(ZenModeSettings.class);
|
||||
addIndex(StorageSettings.class);
|
||||
addIndex(PowerUsageAdvanced.class);
|
||||
|
@@ -26,7 +26,6 @@ import com.android.settings.SettingsActivity;
|
||||
import com.android.settings.search.DatabaseIndexingUtils;
|
||||
import com.android.settings.search.ResultPayload;
|
||||
import com.android.settings.search.ResultPayloadUtils;
|
||||
import com.android.settings.search.SearchIndexableResources;
|
||||
|
||||
import java.text.Normalizer;
|
||||
import java.util.Objects;
|
||||
@@ -269,12 +268,10 @@ public class IndexData {
|
||||
|
||||
boolean isEmptyIntentAction = TextUtils.isEmpty(mIntentAction);
|
||||
// No intent action is set, or the intent action is for a subsetting.
|
||||
if (isEmptyIntentAction
|
||||
|| TextUtils.equals(mIntentTargetPackage,
|
||||
SearchIndexableResources.SUBSETTING_TARGET_PACKAGE)) {
|
||||
if (isEmptyIntentAction) {
|
||||
// Action is null, we will launch it as a sub-setting
|
||||
intent = DatabaseIndexingUtils.buildSearchResultPageIntent(context, mClassName, mKey,
|
||||
mScreenTitle);
|
||||
intent = DatabaseIndexingUtils.buildSearchResultPageIntent(context, mClassName,
|
||||
mKey, mScreenTitle);
|
||||
} else {
|
||||
intent = new Intent(mIntentAction);
|
||||
final String targetClass = mIntentTargetClass;
|
||||
|
@@ -120,6 +120,7 @@ public class XmlParserUtilTest {
|
||||
|
||||
// Null checks
|
||||
@Test
|
||||
@Config(qualifiers = "mcc999")
|
||||
public void testDataKeyInvalid_ReturnsNull() {
|
||||
XmlResourceParser parser = getParentPrimedParser(R.xml.display_settings);
|
||||
final AttributeSet attrs = Xml.asAttributeSet(parser);
|
||||
|
Reference in New Issue
Block a user