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"
|
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:key="accessibility_settings_screen"
|
||||||
android:title="@string/accessibility_settings"
|
android:title="@string/accessibility_settings"
|
||||||
android:persistent="true">
|
android:persistent="true">
|
||||||
|
|
||||||
|
|||||||
@@ -17,9 +17,11 @@
|
|||||||
|
|
||||||
<PreferenceScreen
|
<PreferenceScreen
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:key="ambient_display_preference_screen"
|
||||||
android:title="@string/ambient_display_screen_title">
|
android:title="@string/ambient_display_screen_title">
|
||||||
|
|
||||||
<PreferenceCategory
|
<PreferenceCategory
|
||||||
|
android:key="ambient_display_category_when_to_show"
|
||||||
android:title="@string/ambient_display_category_triggers">
|
android:title="@string/ambient_display_category_triggers">
|
||||||
|
|
||||||
<SwitchPreference
|
<SwitchPreference
|
||||||
@@ -39,7 +41,8 @@
|
|||||||
|
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
|
|
||||||
<PreferenceCategory>
|
<PreferenceCategory
|
||||||
|
android:key="ambient_display_category_notification">
|
||||||
|
|
||||||
<SwitchPreference
|
<SwitchPreference
|
||||||
android:key="ambient_display_notification"
|
android:key="ambient_display_notification"
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
<PreferenceScreen
|
<PreferenceScreen
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
|
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">
|
android:title="@string/app_and_notification_dashboard_title">
|
||||||
|
|
||||||
<PreferenceCategory
|
<PreferenceCategory
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
<PreferenceScreen
|
<PreferenceScreen
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
|
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
|
||||||
|
android:key="app_default_settings_screen"
|
||||||
android:title="@string/app_default_dashboard_title">
|
android:title="@string/app_default_dashboard_title">
|
||||||
|
|
||||||
<Preference
|
<Preference
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
<PreferenceScreen
|
<PreferenceScreen
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:key="connected_devices_screen"
|
||||||
android:title="@string/connected_devices_dashboard_title">
|
android:title="@string/connected_devices_dashboard_title">
|
||||||
|
|
||||||
<com.android.settings.widget.MasterSwitchPreference
|
<com.android.settings.widget.MasterSwitchPreference
|
||||||
|
|||||||
@@ -14,11 +14,14 @@
|
|||||||
limitations under the License.
|
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"
|
xmlns:settings="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:key="data_usage_screen"
|
||||||
android:title="@string/data_usage_summary_title">
|
android:title="@string/data_usage_summary_title">
|
||||||
|
|
||||||
<PreferenceCategory
|
<PreferenceCategory
|
||||||
|
android:key="data_usage_category"
|
||||||
android:title="@string/usage">
|
android:title="@string/usage">
|
||||||
|
|
||||||
<com.android.settings.SummaryPreference
|
<com.android.settings.SummaryPreference
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
<PreferenceScreen
|
<PreferenceScreen
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:key="data_usage_cellular_screen"
|
||||||
android:title="@string/data_usage_summary_title">
|
android:title="@string/data_usage_summary_title">
|
||||||
|
|
||||||
<com.android.settings.datausage.TemplatePreferenceCategory
|
<com.android.settings.datausage.TemplatePreferenceCategory
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
<PreferenceScreen
|
<PreferenceScreen
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:key="data_usage_wifi_screen"
|
||||||
android:title="@string/data_usage_summary_title">
|
android:title="@string/data_usage_summary_title">
|
||||||
|
|
||||||
<com.android.settings.datausage.TemplatePreferenceCategory
|
<com.android.settings.datausage.TemplatePreferenceCategory
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
<PreferenceScreen
|
<PreferenceScreen
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
|
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
|
||||||
|
android:key="date_time_settings_screen"
|
||||||
android:title="@string/date_and_time"
|
android:title="@string/date_and_time"
|
||||||
settings:keywords="@string/keywords_date_and_time">
|
settings:keywords="@string/keywords_date_and_time">
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:key="device_info_pref_screen"
|
||||||
android:title="@string/about_settings">
|
android:title="@string/about_settings">
|
||||||
|
|
||||||
<!-- System update settings - launches activity -->
|
<!-- System update settings - launches activity -->
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
<PreferenceScreen
|
<PreferenceScreen
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:key="device_status_screen"
|
||||||
android:title="@string/device_status_activity_title">
|
android:title="@string/device_status_activity_title">
|
||||||
|
|
||||||
<Preference
|
<Preference
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
<PreferenceScreen
|
<PreferenceScreen
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
|
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
|
||||||
|
android:key="display_settings_screen"
|
||||||
android:title="@string/display_settings"
|
android:title="@string/display_settings"
|
||||||
settings:keywords="@string/keywords_display">
|
settings:keywords="@string/keywords_display">
|
||||||
|
|
||||||
|
|||||||
@@ -15,8 +15,10 @@
|
|||||||
limitations under the License.
|
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:app="http://schemas.android.com/apk/res-auto"
|
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">
|
android:title="@string/double_tap_power_for_camera_title">
|
||||||
|
|
||||||
<com.android.settings.widget.VideoPreference
|
<com.android.settings.widget.VideoPreference
|
||||||
|
|||||||
@@ -15,8 +15,10 @@
|
|||||||
limitations under the License.
|
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:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:key="gesture_double_tap_screen_screen"
|
||||||
android:title="@string/ambient_display_title">
|
android:title="@string/ambient_display_title">
|
||||||
|
|
||||||
<com.android.settings.widget.VideoPreference
|
<com.android.settings.widget.VideoPreference
|
||||||
|
|||||||
@@ -15,8 +15,10 @@
|
|||||||
limitations under the License.
|
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:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:key="gesture_double_twist_screen"
|
||||||
android:title="@string/double_twist_for_camera_mode_title">
|
android:title="@string/double_twist_for_camera_mode_title">
|
||||||
|
|
||||||
<com.android.settings.widget.VideoPreference
|
<com.android.settings.widget.VideoPreference
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
<PreferenceScreen
|
<PreferenceScreen
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
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" >
|
android:title="@string/screensaver_settings_title" >
|
||||||
|
|
||||||
<com.android.settings.widget.GearPreference
|
<com.android.settings.widget.GearPreference
|
||||||
@@ -31,7 +31,8 @@
|
|||||||
|
|
||||||
|
|
||||||
<!-- Layout preference doesn't obey allowDividerAbove, so put it in a PreferenceCategory -->
|
<!-- 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
|
<com.android.settings.applications.LayoutPreference
|
||||||
android:key="dream_start_now_button_container"
|
android:key="dream_start_now_button_container"
|
||||||
android:selectable="false"
|
android:selectable="false"
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
|
|
||||||
<PreferenceScreen
|
<PreferenceScreen
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:key="gesture_settings_screen"
|
||||||
android:title="@string/gesture_preference_title" >
|
android:title="@string/gesture_preference_title" >
|
||||||
|
|
||||||
<Preference
|
<Preference
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
<PreferenceScreen
|
<PreferenceScreen
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
|
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
|
||||||
|
android:key="language_and_input_settings_screen"
|
||||||
android:title="@string/language_settings" >
|
android:title="@string/language_settings" >
|
||||||
|
|
||||||
<Preference
|
<Preference
|
||||||
@@ -27,6 +28,7 @@
|
|||||||
android:fragment="com.android.settings.localepicker.LocaleListEditor"/>
|
android:fragment="com.android.settings.localepicker.LocaleListEditor"/>
|
||||||
|
|
||||||
<PreferenceCategory
|
<PreferenceCategory
|
||||||
|
android:key="keyboards_category"
|
||||||
android:title="@string/keyboard_and_input_methods_category">
|
android:title="@string/keyboard_and_input_methods_category">
|
||||||
<Preference
|
<Preference
|
||||||
android:key="virtual_keyboard_pref"
|
android:key="virtual_keyboard_pref"
|
||||||
@@ -40,6 +42,7 @@
|
|||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
|
|
||||||
<PreferenceCategory
|
<PreferenceCategory
|
||||||
|
android:key="input_assistance_category"
|
||||||
android:title="@string/input_assistance">
|
android:title="@string/input_assistance">
|
||||||
<!-- Spell checker preference title, summary and fragment will be set programmatically. -->
|
<!-- Spell checker preference title, summary and fragment will be set programmatically. -->
|
||||||
<!-- Note: Mark this as persistent="false" to remove unnecessarily saved shared preference.
|
<!-- Note: Mark this as persistent="false" to remove unnecessarily saved shared preference.
|
||||||
@@ -62,7 +65,8 @@
|
|||||||
android:title="@string/user_dict_settings_title"/>
|
android:title="@string/user_dict_settings_title"/>
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
|
|
||||||
<PreferenceCategory>
|
<PreferenceCategory
|
||||||
|
android:key="pointer_and_tts_category">
|
||||||
|
|
||||||
<com.android.settings.PointerSpeedPreference
|
<com.android.settings.PointerSpeedPreference
|
||||||
android:key="pointer_speed"
|
android:key="pointer_speed"
|
||||||
|
|||||||
@@ -29,6 +29,7 @@
|
|||||||
android:fragment="com.android.settings.localepicker.LocaleListEditor"/>
|
android:fragment="com.android.settings.localepicker.LocaleListEditor"/>
|
||||||
|
|
||||||
<PreferenceCategory
|
<PreferenceCategory
|
||||||
|
android:key="keyboards_category"
|
||||||
android:title="@string/keyboard_and_input_methods_category">
|
android:title="@string/keyboard_and_input_methods_category">
|
||||||
<Preference
|
<Preference
|
||||||
android:key="virtual_keyboard_pref"
|
android:key="virtual_keyboard_pref"
|
||||||
@@ -42,6 +43,7 @@
|
|||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
|
|
||||||
<PreferenceCategory
|
<PreferenceCategory
|
||||||
|
android:key="input_assistance_category"
|
||||||
android:title="@string/input_assistance">
|
android:title="@string/input_assistance">
|
||||||
<!-- Spell checker preference title, summary and fragment will be set programmatically. -->
|
<!-- Spell checker preference title, summary and fragment will be set programmatically. -->
|
||||||
<!-- Note: Mark this as persistent="false" to remove unnecessarily saved shared preference.
|
<!-- Note: Mark this as persistent="false" to remove unnecessarily saved shared preference.
|
||||||
@@ -64,7 +66,8 @@
|
|||||||
android:title="@string/user_dict_settings_title"/>
|
android:title="@string/user_dict_settings_title"/>
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
|
|
||||||
<PreferenceCategory>
|
<PreferenceCategory
|
||||||
|
android:key="pointer_and_tts_category">
|
||||||
|
|
||||||
<com.android.settings.PointerSpeedPreference
|
<com.android.settings.PointerSpeedPreference
|
||||||
android:key="pointer_speed"
|
android:key="pointer_speed"
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
|
|
||||||
<PreferenceScreen
|
<PreferenceScreen
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:key="manage_assist_screen"
|
||||||
android:title="@string/assist_and_voice_input_title">
|
android:title="@string/assist_and_voice_input_title">
|
||||||
|
|
||||||
<com.android.settings.widget.GearPreference
|
<com.android.settings.widget.GearPreference
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
<PreferenceScreen
|
<PreferenceScreen
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
|
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
|
||||||
|
android:key="network_and_internet_screen"
|
||||||
android:title="@string/network_dashboard_title">
|
android:title="@string/network_dashboard_title">
|
||||||
|
|
||||||
<com.android.settings.widget.MasterSwitchPreference
|
<com.android.settings.widget.MasterSwitchPreference
|
||||||
|
|||||||
@@ -13,7 +13,9 @@
|
|||||||
See the License for the specific language governing permissions and
|
See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
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">
|
android:title="@string/physical_keyboard_title">
|
||||||
<!-- Additional preference screens are inserted here programmatically
|
<!-- Additional preference screens are inserted here programmatically
|
||||||
with low order values to set the key map of each attached keyboard. -->
|
with low order values to set the key map of each attached keyboard. -->
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
<PreferenceScreen
|
<PreferenceScreen
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
|
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
|
||||||
|
android:key="power_usage_advanced_screen"
|
||||||
android:title="@string/advanced_battery_title"
|
android:title="@string/advanced_battery_title"
|
||||||
settings:keywords="@string/keywords_battery">
|
settings:keywords="@string/keywords_battery">
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
<PreferenceScreen
|
<PreferenceScreen
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
|
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
|
||||||
|
android:key="power_usage_summary_screen"
|
||||||
android:title="@string/power_usage_summary_title"
|
android:title="@string/power_usage_summary_title"
|
||||||
settings:keywords="@string/keywords_battery">
|
settings:keywords="@string/keywords_battery">
|
||||||
|
|
||||||
|
|||||||
@@ -14,21 +14,21 @@
|
|||||||
limitations under the License.
|
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/com.android.settings"
|
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
|
||||||
|
android:key="print_settings_screen"
|
||||||
android:title="@string/print_settings_title"
|
android:title="@string/print_settings_title"
|
||||||
settings:keywords="@string/keywords_printing">
|
settings:keywords="@string/keywords_printing">
|
||||||
|
|
||||||
<PreferenceCategory
|
<PreferenceCategory
|
||||||
android:key="print_jobs_category"
|
android:key="print_jobs_category"
|
||||||
android:title="@string/print_print_jobs"
|
android:title="@string/print_print_jobs"
|
||||||
android:order="0">
|
android:order="0" />
|
||||||
</PreferenceCategory>
|
|
||||||
|
|
||||||
<PreferenceCategory
|
<PreferenceCategory
|
||||||
android:key="print_services_category"
|
android:key="print_services_category"
|
||||||
android:title="@string/print_settings_title"
|
android:title="@string/print_settings_title"
|
||||||
android:order="1">
|
android:order="1" />
|
||||||
</PreferenceCategory>
|
|
||||||
|
|
||||||
</PreferenceScreen>
|
</PreferenceScreen>
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
<PreferenceScreen
|
<PreferenceScreen
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:key="security_lockscreen_settings_screen"
|
||||||
android:title="@string/lockscreen_settings_title">
|
android:title="@string/lockscreen_settings_title">
|
||||||
|
|
||||||
<com.android.settings.notification.RestrictedDropDownPreference
|
<com.android.settings.notification.RestrictedDropDownPreference
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
<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/com.android.settings"
|
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
|
||||||
|
android:key="security_settings_chooser_screen"
|
||||||
android:title="@string/security_settings_title">
|
android:title="@string/security_settings_title">
|
||||||
|
|
||||||
<PreferenceCategory
|
<PreferenceCategory
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:key="security_settings_encrypted_screen"
|
||||||
android:title="@string/security_settings_title">
|
android:title="@string/security_settings_title">
|
||||||
|
|
||||||
<PreferenceCategory
|
<PreferenceCategory
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
<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/com.android.settings"
|
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
|
||||||
|
android:key="security_settings_lockscreen_screen"
|
||||||
android:title="@string/security_settings_title">
|
android:title="@string/security_settings_title">
|
||||||
|
|
||||||
<PreferenceCategory
|
<PreferenceCategory
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
<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/com.android.settings"
|
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
|
||||||
|
android:key="security_settings_lockscreen_profile_screen"
|
||||||
android:title="@string/security_settings_title">
|
android:title="@string/security_settings_title">
|
||||||
|
|
||||||
<com.android.settingslib.RestrictedPreference
|
<com.android.settingslib.RestrictedPreference
|
||||||
|
|||||||
@@ -15,10 +15,12 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:key="security_settings_misc_screen"
|
||||||
android:title="@string/security_settings_title">
|
android:title="@string/security_settings_title">
|
||||||
|
|
||||||
<PreferenceCategory android:title="@string/security_passwords_title"
|
<PreferenceCategory
|
||||||
android:persistent="false">
|
android:key="security_settings_misc_category"
|
||||||
|
android:title="@string/security_passwords_title">
|
||||||
|
|
||||||
<Preference
|
<Preference
|
||||||
android:key="location"
|
android:key="location"
|
||||||
@@ -33,7 +35,8 @@
|
|||||||
|
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
|
|
||||||
<PreferenceCategory>
|
<PreferenceCategory
|
||||||
|
android:key="security_settings_device_admin_category">
|
||||||
|
|
||||||
<Preference android:key="manage_device_admin"
|
<Preference android:key="manage_device_admin"
|
||||||
android:title="@string/manage_device_admin"
|
android:title="@string/manage_device_admin"
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
<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/com.android.settings"
|
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
|
||||||
|
android:key="security_settings_password_screen"
|
||||||
android:title="@string/lock_settings_picker_title">
|
android:title="@string/lock_settings_picker_title">
|
||||||
|
|
||||||
<PreferenceCategory
|
<PreferenceCategory
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
<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/com.android.settings"
|
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
|
||||||
|
android:key="security_settings_password_profile_screen"
|
||||||
android:title="@string/security_settings_title">
|
android:title="@string/security_settings_title">
|
||||||
|
|
||||||
<com.android.settingslib.RestrictedPreference
|
<com.android.settingslib.RestrictedPreference
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
|
|
||||||
<PreferenceScreen
|
<PreferenceScreen
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:key="security_settings_password_sub_screen"
|
||||||
android:title="@string/settings_label">
|
android:title="@string/settings_label">
|
||||||
|
|
||||||
<com.android.settings.TimeoutListPreference
|
<com.android.settings.TimeoutListPreference
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
<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/com.android.settings"
|
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
|
||||||
|
android:key="security_settings_pattern_screen"
|
||||||
android:title="@string/lock_settings_picker_title">
|
android:title="@string/lock_settings_picker_title">
|
||||||
|
|
||||||
<PreferenceCategory
|
<PreferenceCategory
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
<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/com.android.settings"
|
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
|
||||||
|
android:key="security_settings_pattern_profile_screen"
|
||||||
android:title="@string/security_settings_title">
|
android:title="@string/security_settings_title">
|
||||||
|
|
||||||
<com.android.settingslib.RestrictedPreference
|
<com.android.settingslib.RestrictedPreference
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
|
|
||||||
<PreferenceScreen
|
<PreferenceScreen
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:key="security_settings_pattern_sub_screen"
|
||||||
android:title="@string/settings_label">
|
android:title="@string/settings_label">
|
||||||
|
|
||||||
<SwitchPreference
|
<SwitchPreference
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
<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/com.android.settings"
|
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
|
||||||
|
android:key="security_settings_pin_profile_screen"
|
||||||
android:title="@string/security_settings_title">
|
android:title="@string/security_settings_title">
|
||||||
|
|
||||||
<com.android.settingslib.RestrictedPreference
|
<com.android.settingslib.RestrictedPreference
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
|
|
||||||
<PreferenceScreen
|
<PreferenceScreen
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:key="security_settings_pin_sub_screen"
|
||||||
android:title="@string/settings_label">
|
android:title="@string/settings_label">
|
||||||
|
|
||||||
<com.android.settings.TimeoutListPreference
|
<com.android.settings.TimeoutListPreference
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
|
|
||||||
<PreferenceScreen
|
<PreferenceScreen
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:key="security_settings_slide_sub_screen"
|
||||||
android:title="@string/settings_label">
|
android:title="@string/settings_label">
|
||||||
|
|
||||||
<com.android.settingslib.RestrictedPreference
|
<com.android.settingslib.RestrictedPreference
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:key="security_settings_unencrypted_screen"
|
||||||
android:title="@string/crypt_keeper_settings_title">
|
android:title="@string/crypt_keeper_settings_title">
|
||||||
|
|
||||||
<PreferenceCategory
|
<PreferenceCategory
|
||||||
|
|||||||
@@ -22,6 +22,7 @@
|
|||||||
settings:keywords="@string/keywords_sounds">
|
settings:keywords="@string/keywords_sounds">
|
||||||
|
|
||||||
<PreferenceCategory
|
<PreferenceCategory
|
||||||
|
android:key="sound_settings_primary_items_category"
|
||||||
android:order="-100">
|
android:order="-100">
|
||||||
<!-- Media volume -->
|
<!-- Media volume -->
|
||||||
<com.android.settings.notification.VolumeSeekBarPreference
|
<com.android.settings.notification.VolumeSeekBarPreference
|
||||||
@@ -93,6 +94,7 @@
|
|||||||
|
|
||||||
<!-- Other sounds -->
|
<!-- Other sounds -->
|
||||||
<PreferenceCategory
|
<PreferenceCategory
|
||||||
|
android:key="other_sounds_and_vibrations_category"
|
||||||
android:title="@string/other_sound_category_preference_title"
|
android:title="@string/other_sound_category_preference_title"
|
||||||
android:order="-50">
|
android:order="-50">
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
<PreferenceScreen
|
<PreferenceScreen
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
|
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
|
||||||
|
android:key="special_app_access_screen"
|
||||||
android:title="@string/special_access">
|
android:title="@string/special_access">
|
||||||
|
|
||||||
<Preference
|
<Preference
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
<PreferenceScreen
|
<PreferenceScreen
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
|
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
|
||||||
|
android:key="storage_dashboard_screen"
|
||||||
android:title="@string/storage_settings"
|
android:title="@string/storage_settings"
|
||||||
android:orderingFromXml="false">
|
android:orderingFromXml="false">
|
||||||
<com.android.settings.deviceinfo.storage.StorageSummaryDonutPreference
|
<com.android.settings.deviceinfo.storage.StorageSummaryDonutPreference
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
|
|
||||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:key="gesture_swipe_down_fingerprint_screen"
|
||||||
android:title="@string/fingerprint_gesture_screen_title">
|
android:title="@string/fingerprint_gesture_screen_title">
|
||||||
|
|
||||||
<com.android.settings.widget.VideoPreference
|
<com.android.settings.widget.VideoPreference
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
<PreferenceScreen
|
<PreferenceScreen
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:key="system_dashboard_screen"
|
||||||
android:title="@string/header_category_system">
|
android:title="@string/header_category_system">
|
||||||
|
|
||||||
<Preference
|
<Preference
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
<PreferenceScreen
|
<PreferenceScreen
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:key="tts_settings_screen"
|
||||||
android:title="@string/tts_settings_title">
|
android:title="@string/tts_settings_title">
|
||||||
|
|
||||||
<PreferenceCategory android:key="tts_engine_section">
|
<PreferenceCategory android:key="tts_engine_section">
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
<PreferenceScreen
|
<PreferenceScreen
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
|
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
|
||||||
|
android:key="user_and_account_settings_screen"
|
||||||
android:title="@string/account_dashboard_title"
|
android:title="@string/account_dashboard_title"
|
||||||
settings:keywords="@string/keywords_accounts">
|
settings:keywords="@string/keywords_accounts">
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,9 @@
|
|||||||
See the License for the specific language governing permissions and
|
See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
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">
|
android:title="@string/virtual_keyboard_category">
|
||||||
<!-- Enabled input method list will be populated programmatically here. -->
|
<!-- Enabled input method list will be populated programmatically here. -->
|
||||||
<Preference
|
<Preference
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
<PreferenceScreen
|
<PreferenceScreen
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings"
|
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">
|
android:title="@string/wifi_configure_settings_preference_title">
|
||||||
|
|
||||||
<SwitchPreference
|
<SwitchPreference
|
||||||
|
|||||||
@@ -17,7 +17,6 @@
|
|||||||
package com.android.settings;
|
package com.android.settings;
|
||||||
|
|
||||||
import static android.provider.Settings.System.SCREEN_OFF_TIMEOUT;
|
import static android.provider.Settings.System.SCREEN_OFF_TIMEOUT;
|
||||||
|
|
||||||
import static com.android.settingslib.RestrictedLockUtils.EnforcedAdmin;
|
import static com.android.settingslib.RestrictedLockUtils.EnforcedAdmin;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
@@ -382,14 +381,6 @@ public class SecuritySettings extends SettingsPreferenceFragment
|
|||||||
// Advanced Security features
|
// Advanced Security features
|
||||||
initTrustAgentPreference(root, numberOfTrustAgent);
|
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 securityStatusPreferenceGroup =
|
||||||
(PreferenceGroup) root.findPreference(KEY_SECURITY_STATUS);
|
(PreferenceGroup) root.findPreference(KEY_SECURITY_STATUS);
|
||||||
final List<Preference> tilePrefs = mDashboardFeatureProvider.getPreferencesForCategory(
|
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.PreferenceControllerMixin;
|
||||||
import com.android.settings.core.instrumentation.MetricsFeatureProvider;
|
import com.android.settings.core.instrumentation.MetricsFeatureProvider;
|
||||||
import com.android.settings.overlay.FeatureFactory;
|
import com.android.settings.overlay.FeatureFactory;
|
||||||
import com.android.settings.search.SearchFeatureProviderImpl;
|
|
||||||
import com.android.settings.search.SearchIndexableRaw;
|
import com.android.settings.search.SearchIndexableRaw;
|
||||||
import com.android.settingslib.RestrictedPreference;
|
import com.android.settingslib.RestrictedPreference;
|
||||||
import com.android.settingslib.accounts.AuthenticatorHelper;
|
import com.android.settingslib.accounts.AuthenticatorHelper;
|
||||||
@@ -346,8 +345,6 @@ public class AccountPreferenceController extends AbstractPreferenceController
|
|||||||
DISALLOW_MODIFY_ACCOUNTS, userInfo.id);
|
DISALLOW_MODIFY_ACCOUNTS, userInfo.id);
|
||||||
}
|
}
|
||||||
mProfiles.put(userInfo.id, profileData);
|
mProfiles.put(userInfo.id, profileData);
|
||||||
new SearchFeatureProviderImpl().getIndexingManager(mContext).updateFromClassNameResource(
|
|
||||||
UserAndAccountDashboardFragment.class.getName(), true /* includeInSearchResults */);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private DimmableIconPreference newAddAccountPreference(Context context) {
|
private DimmableIconPreference newAddAccountPreference(Context context) {
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ import static android.provider.Settings.EXTRA_AUTHORITIES;
|
|||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.pm.UserInfo;
|
import android.content.pm.UserInfo;
|
||||||
import android.os.Bundle;
|
|
||||||
import android.os.UserHandle;
|
import android.os.UserHandle;
|
||||||
import android.os.UserManager;
|
import android.os.UserManager;
|
||||||
import android.provider.SearchIndexableResource;
|
import android.provider.SearchIndexableResource;
|
||||||
@@ -31,7 +30,6 @@ import com.android.settings.dashboard.DashboardFragment;
|
|||||||
import com.android.settings.dashboard.SummaryLoader;
|
import com.android.settings.dashboard.SummaryLoader;
|
||||||
import com.android.settings.search.BaseSearchIndexProvider;
|
import com.android.settings.search.BaseSearchIndexProvider;
|
||||||
import com.android.settingslib.core.AbstractPreferenceController;
|
import com.android.settingslib.core.AbstractPreferenceController;
|
||||||
import com.android.settingslib.drawer.Tile;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
@@ -40,7 +38,6 @@ import java.util.List;
|
|||||||
public class UserAndAccountDashboardFragment extends DashboardFragment {
|
public class UserAndAccountDashboardFragment extends DashboardFragment {
|
||||||
|
|
||||||
private static final String TAG = "UserAndAccountDashboard";
|
private static final String TAG = "UserAndAccountDashboard";
|
||||||
private static final String METADATA_IA_ACCOUNT = "com.android.settings.ia.account";
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMetricsCategory() {
|
public int getMetricsCategory() {
|
||||||
|
|||||||
@@ -18,20 +18,18 @@
|
|||||||
package com.android.settings.search;
|
package com.android.settings.search;
|
||||||
|
|
||||||
import static com.android.settings.search.DatabaseResultLoader.COLUMN_INDEX_ID;
|
import static com.android.settings.search.DatabaseResultLoader.COLUMN_INDEX_ID;
|
||||||
import static com.android.settings.search.DatabaseResultLoader
|
import static com.android.settings.search.DatabaseResultLoader.COLUMN_INDEX_INTENT_ACTION_TARGET_PACKAGE;
|
||||||
.COLUMN_INDEX_INTENT_ACTION_TARGET_PACKAGE;
|
|
||||||
import static com.android.settings.search.DatabaseResultLoader.COLUMN_INDEX_KEY;
|
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.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.CLASS_NAME;
|
||||||
import static com.android.settings.search.IndexDatabaseHelper.IndexColumns.DATA_ENTRIES;
|
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_KEYWORDS;
|
||||||
import static com.android.settings.search.IndexDatabaseHelper.IndexColumns.DATA_KEY_REF;
|
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;
|
||||||
import static com.android.settings.search.IndexDatabaseHelper.IndexColumns
|
import static com.android.settings.search.IndexDatabaseHelper.IndexColumns.DATA_SUMMARY_ON_NORMALIZED;
|
||||||
.DATA_SUMMARY_ON_NORMALIZED;
|
|
||||||
import static com.android.settings.search.IndexDatabaseHelper.IndexColumns.DATA_TITLE;
|
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.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.ENABLED;
|
||||||
import static com.android.settings.search.IndexDatabaseHelper.IndexColumns.ICON;
|
import static com.android.settings.search.IndexDatabaseHelper.IndexColumns.ICON;
|
||||||
import static com.android.settings.search.IndexDatabaseHelper.IndexColumns.INTENT_ACTION;
|
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.database.sqlite.SQLiteException;
|
||||||
import android.os.AsyncTask;
|
import android.os.AsyncTask;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.provider.SearchIndexableResource;
|
|
||||||
import android.provider.SearchIndexablesContract;
|
import android.provider.SearchIndexablesContract;
|
||||||
import android.support.annotation.VisibleForTesting;
|
import android.support.annotation.VisibleForTesting;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
import com.android.settings.overlay.FeatureFactory;
|
import com.android.settings.overlay.FeatureFactory;
|
||||||
|
|
||||||
import com.android.settings.search.indexing.IndexData;
|
import com.android.settings.search.indexing.IndexData;
|
||||||
import com.android.settings.search.indexing.IndexDataConverter;
|
import com.android.settings.search.indexing.IndexDataConverter;
|
||||||
import com.android.settings.search.indexing.PreIndexData;
|
import com.android.settings.search.indexing.PreIndexData;
|
||||||
@@ -365,36 +361,6 @@ public class DatabaseIndexingManager {
|
|||||||
disabledResults.close();
|
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() {
|
private SQLiteDatabase getWritableDatabase() {
|
||||||
try {
|
try {
|
||||||
return IndexDatabaseHelper.getInstance(mContext).getWritableDatabase();
|
return IndexDatabaseHelper.getInstance(mContext).getWritableDatabase();
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ package com.android.settings.search;
|
|||||||
import android.provider.SearchIndexableResource;
|
import android.provider.SearchIndexableResource;
|
||||||
import android.support.annotation.VisibleForTesting;
|
import android.support.annotation.VisibleForTesting;
|
||||||
import android.support.annotation.XmlRes;
|
import android.support.annotation.XmlRes;
|
||||||
import android.text.TextUtils;
|
|
||||||
|
|
||||||
import com.android.settings.DateTimeSettings;
|
import com.android.settings.DateTimeSettings;
|
||||||
import com.android.settings.DeviceInfoSettings;
|
import com.android.settings.DeviceInfoSettings;
|
||||||
@@ -92,13 +91,6 @@ import java.util.Collection;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
|
||||||
public final class SearchIndexableResources {
|
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
|
@XmlRes
|
||||||
public static final int NO_RES_ID = 0;
|
public static final int NO_RES_ID = 0;
|
||||||
|
|
||||||
@@ -107,20 +99,10 @@ public final class SearchIndexableResources {
|
|||||||
|
|
||||||
@VisibleForTesting
|
@VisibleForTesting
|
||||||
static void addIndex(Class<?> indexClass) {
|
static void addIndex(Class<?> indexClass) {
|
||||||
addIndex(indexClass, null /* targetAction */);
|
|
||||||
}
|
|
||||||
|
|
||||||
@VisibleForTesting
|
|
||||||
static void addIndex(Class<?> indexClass, String targetAction) {
|
|
||||||
String className = indexClass.getName();
|
String className = indexClass.getName();
|
||||||
SearchIndexableResource resource = new SearchIndexableResource(
|
SearchIndexableResource resource = new SearchIndexableResource(
|
||||||
0 /* rank */, NO_RES_ID, className, NO_RES_ID);
|
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);
|
sResMap.put(className, resource);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -133,11 +115,11 @@ public final class SearchIndexableResources {
|
|||||||
addIndex(DataUsageSummary.class);
|
addIndex(DataUsageSummary.class);
|
||||||
addIndex(DataUsageMeteredSettings.class);
|
addIndex(DataUsageMeteredSettings.class);
|
||||||
addIndex(ScreenZoomSettings.class);
|
addIndex(ScreenZoomSettings.class);
|
||||||
addIndex(DisplaySettings.class, "android.settings.DISPLAY_SETTINGS");
|
addIndex(DisplaySettings.class);
|
||||||
addIndex(AmbientDisplaySettings.class);
|
addIndex(AmbientDisplaySettings.class);
|
||||||
addIndex(WallpaperTypeSettings.class);
|
addIndex(WallpaperTypeSettings.class);
|
||||||
addIndex(AppAndNotificationDashboardFragment.class);
|
addIndex(AppAndNotificationDashboardFragment.class);
|
||||||
addIndex(SoundSettings.class, "android.settings.SOUND_SETTINGS");
|
addIndex(SoundSettings.class);
|
||||||
addIndex(ZenModeSettings.class);
|
addIndex(ZenModeSettings.class);
|
||||||
addIndex(StorageSettings.class);
|
addIndex(StorageSettings.class);
|
||||||
addIndex(PowerUsageAdvanced.class);
|
addIndex(PowerUsageAdvanced.class);
|
||||||
|
|||||||
@@ -26,7 +26,6 @@ import com.android.settings.SettingsActivity;
|
|||||||
import com.android.settings.search.DatabaseIndexingUtils;
|
import com.android.settings.search.DatabaseIndexingUtils;
|
||||||
import com.android.settings.search.ResultPayload;
|
import com.android.settings.search.ResultPayload;
|
||||||
import com.android.settings.search.ResultPayloadUtils;
|
import com.android.settings.search.ResultPayloadUtils;
|
||||||
import com.android.settings.search.SearchIndexableResources;
|
|
||||||
|
|
||||||
import java.text.Normalizer;
|
import java.text.Normalizer;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
@@ -269,12 +268,10 @@ public class IndexData {
|
|||||||
|
|
||||||
boolean isEmptyIntentAction = TextUtils.isEmpty(mIntentAction);
|
boolean isEmptyIntentAction = TextUtils.isEmpty(mIntentAction);
|
||||||
// No intent action is set, or the intent action is for a subsetting.
|
// No intent action is set, or the intent action is for a subsetting.
|
||||||
if (isEmptyIntentAction
|
if (isEmptyIntentAction) {
|
||||||
|| TextUtils.equals(mIntentTargetPackage,
|
|
||||||
SearchIndexableResources.SUBSETTING_TARGET_PACKAGE)) {
|
|
||||||
// Action is null, we will launch it as a sub-setting
|
// Action is null, we will launch it as a sub-setting
|
||||||
intent = DatabaseIndexingUtils.buildSearchResultPageIntent(context, mClassName, mKey,
|
intent = DatabaseIndexingUtils.buildSearchResultPageIntent(context, mClassName,
|
||||||
mScreenTitle);
|
mKey, mScreenTitle);
|
||||||
} else {
|
} else {
|
||||||
intent = new Intent(mIntentAction);
|
intent = new Intent(mIntentAction);
|
||||||
final String targetClass = mIntentTargetClass;
|
final String targetClass = mIntentTargetClass;
|
||||||
|
|||||||
@@ -120,6 +120,7 @@ public class XmlParserUtilTest {
|
|||||||
|
|
||||||
// Null checks
|
// Null checks
|
||||||
@Test
|
@Test
|
||||||
|
@Config(qualifiers = "mcc999")
|
||||||
public void testDataKeyInvalid_ReturnsNull() {
|
public void testDataKeyInvalid_ReturnsNull() {
|
||||||
XmlResourceParser parser = getParentPrimedParser(R.xml.display_settings);
|
XmlResourceParser parser = getParentPrimedParser(R.xml.display_settings);
|
||||||
final AttributeSet attrs = Xml.asAttributeSet(parser);
|
final AttributeSet attrs = Xml.asAttributeSet(parser);
|
||||||
|
|||||||
Reference in New Issue
Block a user