Show Search settings in Settings app.
The Settings app now shows a "Search settings" item, if there is an activity that handles the Search settings intent. This conditionally included settings is handled in the same way as the sync settings.
This commit is contained in:
@@ -832,6 +832,11 @@
|
||||
<!-- Main Settings screen setting option summary text for the itme to go into the screen with data sync settings-->
|
||||
<string name="sync_settings_summary">Select which applications are synchronized</string>
|
||||
|
||||
<!-- Main Settings screen, setting option name to go into search settings -->
|
||||
<string name="search_settings">Search</string>
|
||||
<!-- Main Settings screen, setting option summary to go into search settings -->
|
||||
<string name="search_settings_summary">Manage global search, web search and search history</string>
|
||||
|
||||
<!-- Display settings -->
|
||||
<!-- Sound & display settings screen, section header for settings related to display -->
|
||||
<string name="display_settings">Display settings</string>
|
||||
|
@@ -115,6 +115,22 @@
|
||||
android:targetClass="com.android.settings.LanguageSettings" />
|
||||
</PreferenceScreen>
|
||||
|
||||
|
||||
<!-- Search.
|
||||
The settings activity will ensure that this is resolved to an
|
||||
activity on the system image, otherwise it will remove this
|
||||
preference.
|
||||
The intent action is the same as
|
||||
android.app.SearchManager.INTENT_ACTION_SEARCH_SETTINGS.
|
||||
-->
|
||||
|
||||
<PreferenceScreen
|
||||
android:title="@string/search_settings"
|
||||
android:summary="@string/search_settings_summary"
|
||||
android:key="search_settings">
|
||||
<intent android:action="android.search.action.SEARCH_SETTINGS" />
|
||||
</PreferenceScreen>
|
||||
|
||||
<!-- About Device -->
|
||||
|
||||
<PreferenceScreen
|
||||
|
@@ -26,6 +26,7 @@ public class Settings extends PreferenceActivity {
|
||||
private static final String KEY_PARENT = "parent";
|
||||
private static final String KEY_CALL_SETTINGS = "call_settings";
|
||||
private static final String KEY_SYNC_SETTINGS = "sync_settings";
|
||||
private static final String KEY_SEARCH_SETTINGS = "search_settings";
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
@@ -35,6 +36,7 @@ public class Settings extends PreferenceActivity {
|
||||
|
||||
PreferenceGroup parent = (PreferenceGroup) findPreference(KEY_PARENT);
|
||||
Utils.updatePreferenceToSpecificActivityOrRemove(this, parent, KEY_SYNC_SETTINGS, 0);
|
||||
Utils.updatePreferenceToSpecificActivityOrRemove(this, parent, KEY_SEARCH_SETTINGS, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user