Make TopLevelSettings un-searchable and direct result to relevant page.
Fixes: 149372187 Test: manual & robotest Change-Id: I9daca03d1c11a262f8e3b55bb46aabbc035ece96
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
<PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:settings="http://schemas.android.com/apk/res-auto"
|
||||
android:key="accessibility_settings_screen"
|
||||
android:persistent="false"
|
||||
android:title="@string/accessibility_settings">
|
||||
|
||||
|
@@ -17,7 +17,9 @@
|
||||
<PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:settings="http://schemas.android.com/apk/res-auto"
|
||||
android:title="@string/account_dashboard_title">
|
||||
android:key="user_and_account_settings_screen"
|
||||
android:title="@string/account_dashboard_title"
|
||||
settings:keywords="@string/keywords_accounts">
|
||||
|
||||
<PreferenceCategory
|
||||
android:key="dashboard_tile_placeholder"
|
||||
|
@@ -18,6 +18,7 @@
|
||||
<PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:settings="http://schemas.android.com/apk/res-auto"
|
||||
android:key="apps_and_notification_screen"
|
||||
android:title="@string/app_and_notification_dashboard_title"
|
||||
settings:initialExpandedChildrenCount="4">
|
||||
<!-- the initial count should include the dynamic tiles -->
|
||||
|
@@ -17,6 +17,7 @@
|
||||
<PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:settings="http://schemas.android.com/apk/res-auto"
|
||||
android:key="connected_devices_screen"
|
||||
android:title="@string/connected_devices_dashboard_title">
|
||||
|
||||
<com.android.settings.slices.SlicePreference
|
||||
|
@@ -17,7 +17,9 @@
|
||||
<PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:settings="http://schemas.android.com/apk/res-auto"
|
||||
android:key="display_settings_screen"
|
||||
android:title="@string/display_settings"
|
||||
settings:keywords="@string/keywords_display"
|
||||
settings:initialExpandedChildrenCount="5">
|
||||
|
||||
<com.android.settingslib.RestrictedPreference
|
||||
|
@@ -17,7 +17,9 @@
|
||||
<PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:settings="http://schemas.android.com/apk/res-auto"
|
||||
android:title="@string/location_settings_title">
|
||||
android:key="location_settings"
|
||||
android:title="@string/location_settings_title"
|
||||
settings:keywords="@string/keywords_location">
|
||||
|
||||
<PreferenceCategory
|
||||
android:key="recent_location_requests"
|
||||
|
@@ -18,6 +18,7 @@
|
||||
<PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:settings="http://schemas.android.com/apk/res-auto"
|
||||
android:key="my_device_info_pref_screen"
|
||||
android:title="@string/about_settings">
|
||||
|
||||
<com.android.settingslib.widget.LayoutPreference
|
||||
|
@@ -17,6 +17,7 @@
|
||||
<PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:settings="http://schemas.android.com/apk/res-auto"
|
||||
android:key="network_and_internet_screen"
|
||||
android:title="@string/network_dashboard_title"
|
||||
settings:initialExpandedChildrenCount="5">
|
||||
|
||||
|
@@ -17,7 +17,9 @@
|
||||
<PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:settings="http://schemas.android.com/apk/res-auto"
|
||||
android:title="@string/power_usage_summary_title">
|
||||
android:key="power_usage_summary_screen"
|
||||
android:title="@string/power_usage_summary_title"
|
||||
settings:keywords="@string/keywords_battery">
|
||||
|
||||
<com.android.settingslib.widget.LayoutPreference
|
||||
android:key="battery_header"
|
||||
|
@@ -18,6 +18,7 @@
|
||||
<PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:settings="http://schemas.android.com/apk/res-auto"
|
||||
android:key="privacy_dashboard_page"
|
||||
android:title="@string/privacy_dashboard_title"
|
||||
settings:initialExpandedChildrenCount="4">
|
||||
|
||||
|
@@ -18,6 +18,7 @@
|
||||
<PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:settings="http://schemas.android.com/apk/res-auto"
|
||||
android:key="security_dashboard_page"
|
||||
android:title="@string/security_settings_title"
|
||||
settings:initialExpandedChildrenCount="9">
|
||||
|
||||
|
@@ -18,6 +18,7 @@
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:settings="http://schemas.android.com/apk/res-auto"
|
||||
android:title="@string/sound_settings"
|
||||
android:key="sound_settings"
|
||||
settings:keywords="@string/keywords_sounds"
|
||||
settings:initialExpandedChildrenCount="9">
|
||||
|
||||
|
@@ -17,6 +17,7 @@
|
||||
<PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:settings="http://schemas.android.com/apk/res-auto"
|
||||
android:key="system_dashboard_screen"
|
||||
android:title="@string/header_category_system"
|
||||
settings:initialExpandedChildrenCount="4">
|
||||
|
||||
|
@@ -53,7 +53,6 @@
|
||||
android:icon="@drawable/ic_homepage_battery"
|
||||
android:fragment="com.android.settings.fuelgauge.PowerUsageSummary"
|
||||
android:order="-90"
|
||||
settings:keywords="@string/keywords_battery"
|
||||
settings:controller="com.android.settings.fuelgauge.TopLevelBatteryPreferenceController"/>
|
||||
|
||||
<Preference
|
||||
@@ -80,7 +79,6 @@
|
||||
android:icon="@drawable/ic_homepage_storage"
|
||||
android:order="-60"
|
||||
android:fragment="com.android.settings.deviceinfo.StorageSettings"
|
||||
settings:keywords="@string/keywords_display"
|
||||
settings:controller="com.android.settings.deviceinfo.TopLevelStoragePreferenceController"/>
|
||||
|
||||
<Preference
|
||||
@@ -98,7 +96,6 @@
|
||||
android:icon="@drawable/ic_homepage_location"
|
||||
android:order="-50"
|
||||
android:fragment="com.android.settings.location.LocationSettings"
|
||||
settings:keywords="@string/keywords_location"
|
||||
settings:controller="com.android.settings.location.TopLevelLocationPreferenceController"/>
|
||||
|
||||
<Preference
|
||||
@@ -117,7 +114,6 @@
|
||||
android:icon="@drawable/ic_homepage_accounts"
|
||||
android:order="-30"
|
||||
android:fragment="com.android.settings.accounts.AccountDashboardFragment"
|
||||
settings:keywords="@string/keywords_accounts"
|
||||
settings:controller="com.android.settings.accounts.TopLevelAccountEntryPreferenceController"/>
|
||||
|
||||
<Preference
|
||||
|
@@ -550,6 +550,13 @@ public class StorageSettings extends SettingsPreferenceFragment implements Index
|
||||
final List<SearchIndexableRaw> result = new ArrayList<>();
|
||||
|
||||
SearchIndexableRaw data = new SearchIndexableRaw(context);
|
||||
data.title = context.getString(R.string.storage_settings);
|
||||
data.key = "storage_settings";
|
||||
data.screenTitle = context.getString(R.string.storage_settings);
|
||||
data.keywords = context.getString(R.string.keywords_storage_settings);
|
||||
result.add(data);
|
||||
|
||||
data = new SearchIndexableRaw(context);
|
||||
data.title = context.getString(R.string.internal_storage);
|
||||
data.key = "storage_settings_internal_storage";
|
||||
data.screenTitle = context.getString(R.string.storage_settings);
|
||||
|
@@ -100,5 +100,12 @@ public class TopLevelSettings extends DashboardFragment implements
|
||||
}
|
||||
|
||||
public static final BaseSearchIndexProvider SEARCH_INDEX_DATA_PROVIDER =
|
||||
new BaseSearchIndexProvider(R.xml.top_level_settings);
|
||||
new BaseSearchIndexProvider(R.xml.top_level_settings) {
|
||||
|
||||
@Override
|
||||
protected boolean isPageSearchEnabled(Context context) {
|
||||
// Never searchable, all entries in this page are already indexed elsewhere.
|
||||
return false;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user