Update synonyms and fix some issues related to them

- update synonyms definitions
- fix issue with L release regression for indexing "Backup & reset":
was missing the marker interface "Indexable"
- fix non working synonyms for "Language & input": their declaration
was done in the XML preference file but was not used because the
SearchIndexProvider was built "by hand"

See bug #17474866 Settings search synonyms needs an update

Change-Id: Iceab71a0e3214f3a8ba0dcd77756c3632609c5ce
This commit is contained in:
Fabrice Di Meglio
2014-11-06 16:57:04 -08:00
parent ba53a846b1
commit d34dd4fb9e
4 changed files with 19 additions and 18 deletions

View File

@@ -5567,22 +5567,22 @@
<!--Search Keywords [CHAR LIMIT=NONE]--> <!--Search Keywords [CHAR LIMIT=NONE]-->
<string name="keywords_wifi">wifi wi-fi network connection</string> <string name="keywords_wifi">wifi wi-fi network connection</string>
<string name="keywords_more_default_sms_app">text message</string> <string name="keywords_more_default_sms_app">text message texting messages messaging</string>
<string name="keywords_more_mobile_networks">cellular cell carrier wireless</string> <string name="keywords_more_mobile_networks">cellular cell carrier wireless data 4g 3g 2g lte</string>
<string name="keywords_home">launcher</string> <string name="keywords_home">launcher</string>
<string name="keywords_display">screen touchscreen</string> <string name="keywords_display">screen touchscreen</string>
<string name="keywords_display_brightness_level">dim screen touchscreen</string> <string name="keywords_display_brightness_level">dim screen touchscreen battery</string>
<string name="keywords_display_auto_brightness">dim screen touchscreen</string> <string name="keywords_display_auto_brightness">dim screen touchscreen battery</string>
<string name="keywords_display_wallpaper">background</string> <string name="keywords_display_wallpaper">background personalize customize diplay</string>
<string name="keywords_display_font_size">text size</string> <string name="keywords_display_font_size">text size</string>
<string name="keywords_display_cast_screen">project</string> <string name="keywords_display_cast_screen">project</string>
<string name="keywords_storage">space disk hard drive</string> <string name="keywords_storage">space disk hard drive device usage</string>
<string name="keywords_battery">power</string> <string name="keywords_battery">power usage charge</string>
<string name="keywords_spell_checker">spelling</string> <string name="keywords_spell_checker">spelling dictionary spellcheck auto-correct</string>
<string name="keywords_voice_input">recognizer input speech speak language hands-free hand free recognition offensive word audio history bluetooth headset</string> <string name="keywords_voice_input">recognizer input speech speak language hands-free hand free recognition offensive word audio history bluetooth headset</string>
<string name="keywords_text_to_speech_output">rate language default speak speaking</string> <string name="keywords_text_to_speech_output">rate language default speak speaking tts accessibility reader blind</string>
<string name="keywords_date_and_time">clock</string> <string name="keywords_date_and_time">clock military</string>
<string name="keywords_factory_data_reset">wipe delete</string> <string name="keywords_factory_data_reset">wipe delete restore clear remove</string>
<string name="keywords_printing">printer</string> <string name="keywords_printing">printer</string>
<string name="keywords_sounds_and_notifications">speaker beep</string> <string name="keywords_sounds_and_notifications">speaker beep</string>
<string name="keywords_sounds_and_notifications_interruptions">dont don\'t disturb interrupt interruption break</string> <string name="keywords_sounds_and_notifications_interruptions">dont don\'t disturb interrupt interruption break</string>
@@ -5591,7 +5591,7 @@
<string name="keywords_location_mode">accuracy</string> <string name="keywords_location_mode">accuracy</string>
<string name="keywords_accounts">account</string> <string name="keywords_accounts">account</string>
<string name="keywords_users">restriction restrict restricted</string> <string name="keywords_users">restriction restrict restricted</string>
<string name="keywords_keyboard_and_ime">text correction correct sound vibrate auto language gesture suggest suggestion theme offensive word type emoji</string> <string name="keywords_keyboard_and_ime">text correction correct sound vibrate auto language gesture suggest suggestion theme offensive word type emoji international</string>
<!-- Search keywords for different screen unlock modes : slide to unlock, password, pattern and PIN [CHAR LIMIT=none] --> <!-- Search keywords for different screen unlock modes : slide to unlock, password, pattern and PIN [CHAR LIMIT=none] -->
<string name="keywords_lockscreen">slide password pattern pin</string> <string name="keywords_lockscreen">slide password pattern pin</string>

View File

@@ -31,7 +31,6 @@
<PreferenceScreen <PreferenceScreen
android:key="spellcheckers_settings" android:key="spellcheckers_settings"
android:title="@string/spellcheckers_settings_title" android:title="@string/spellcheckers_settings_title"
settings:keywords="@string/keywords_spell_checker"
android:persistent="false" android:persistent="false"
/> />
@@ -43,8 +42,7 @@
<PreferenceCategory <PreferenceCategory
android:key="keyboard_settings_category" android:key="keyboard_settings_category"
android:title="@string/keyboard_settings_category" android:title="@string/keyboard_settings_category">
settings:keywords="@string/keywords_keyboard_and_ime">
<PreferenceScreen <PreferenceScreen
android:key="current_input_method" android:key="current_input_method"
@@ -68,14 +66,12 @@
<PreferenceScreen <PreferenceScreen
android:key="voice_input_settings" android:key="voice_input_settings"
android:title="@string/voice_input_settings_title" android:title="@string/voice_input_settings_title"
settings:keywords="@string/keywords_voice_input"
android:fragment="com.android.settings.voice.VoiceInputSettings" android:fragment="com.android.settings.voice.VoiceInputSettings"
/> />
<PreferenceScreen <PreferenceScreen
android:key="tts_settings" android:key="tts_settings"
android:title="@string/tts_settings_title" android:title="@string/tts_settings_title"
settings:keywords="@string/keywords_text_to_speech_output"
android:fragment="com.android.settings.tts.TextToSpeechSettings" android:fragment="com.android.settings.tts.TextToSpeechSettings"
/> />

View File

@@ -37,6 +37,7 @@ import android.provider.SearchIndexableResource;
import android.provider.Settings; import android.provider.Settings;
import com.android.settings.search.BaseSearchIndexProvider; import com.android.settings.search.BaseSearchIndexProvider;
import com.android.settings.search.Indexable;
import com.android.settings.search.Indexable.SearchIndexProvider; import com.android.settings.search.Indexable.SearchIndexProvider;
import java.util.ArrayList; import java.util.ArrayList;
@@ -46,7 +47,7 @@ import java.util.List;
* Gesture lock pattern settings. * Gesture lock pattern settings.
*/ */
public class PrivacySettings extends SettingsPreferenceFragment implements public class PrivacySettings extends SettingsPreferenceFragment implements
DialogInterface.OnClickListener { DialogInterface.OnClickListener, Indexable {
// Vendor specific // Vendor specific
private static final String GSETTINGS_PROVIDER = "com.google.settings"; private static final String GSETTINGS_PROVIDER = "com.google.settings";

View File

@@ -666,6 +666,7 @@ public class InputMethodAndLanguageSettings extends SettingsPreferenceFragment
indexable.key = KEY_SPELL_CHECKERS; indexable.key = KEY_SPELL_CHECKERS;
indexable.title = context.getString(R.string.spellcheckers_settings_title); indexable.title = context.getString(R.string.spellcheckers_settings_title);
indexable.screenTitle = screenTitle; indexable.screenTitle = screenTitle;
indexable.keywords = context.getString(R.string.keywords_spell_checker);
indexables.add(indexable); indexables.add(indexable);
// User dictionary. // User dictionary.
@@ -682,6 +683,7 @@ public class InputMethodAndLanguageSettings extends SettingsPreferenceFragment
indexable.key = "keyboard_settings"; indexable.key = "keyboard_settings";
indexable.title = context.getString(R.string.keyboard_settings_category); indexable.title = context.getString(R.string.keyboard_settings_category);
indexable.screenTitle = screenTitle; indexable.screenTitle = screenTitle;
indexable.keywords = context.getString(R.string.keywords_keyboard_and_ime);
indexables.add(indexable); indexables.add(indexable);
InputMethodSettingValuesWrapper immValues = InputMethodSettingValuesWrapper InputMethodSettingValuesWrapper immValues = InputMethodSettingValuesWrapper
@@ -787,6 +789,7 @@ public class InputMethodAndLanguageSettings extends SettingsPreferenceFragment
indexable.key = "voice_input_settings"; indexable.key = "voice_input_settings";
indexable.title = context.getString(R.string.voice_input_settings); indexable.title = context.getString(R.string.voice_input_settings);
indexable.screenTitle = screenTitle; indexable.screenTitle = screenTitle;
indexable.keywords = context.getString(R.string.keywords_voice_input);
indexables.add(indexable); indexables.add(indexable);
// Text-to-speech. // Text-to-speech.
@@ -796,6 +799,7 @@ public class InputMethodAndLanguageSettings extends SettingsPreferenceFragment
indexable.key = "tts_settings"; indexable.key = "tts_settings";
indexable.title = context.getString(R.string.tts_settings_title); indexable.title = context.getString(R.string.tts_settings_title);
indexable.screenTitle = screenTitle; indexable.screenTitle = screenTitle;
indexable.keywords = context.getString(R.string.keywords_text_to_speech_output);
indexables.add(indexable); indexables.add(indexable);
} }