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
diff --git a/res/values/strings.xml b/res/values/strings.xml
index e4a21c6..12c6054 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -5567,22 +5567,22 @@
 
     <!--Search Keywords [CHAR LIMIT=NONE]-->
     <string name="keywords_wifi">wifi wi-fi network connection</string>
-    <string name="keywords_more_default_sms_app">text message</string>
-    <string name="keywords_more_mobile_networks">cellular cell carrier wireless</string>
+    <string name="keywords_more_default_sms_app">text message texting messages messaging</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_display">screen touchscreen</string>
-    <string name="keywords_display_brightness_level">dim screen touchscreen</string>
-    <string name="keywords_display_auto_brightness">dim screen touchscreen</string>
-    <string name="keywords_display_wallpaper">background</string>
+    <string name="keywords_display_brightness_level">dim screen touchscreen battery</string>
+    <string name="keywords_display_auto_brightness">dim screen touchscreen battery</string>
+    <string name="keywords_display_wallpaper">background personalize customize diplay</string>
     <string name="keywords_display_font_size">text size</string>
     <string name="keywords_display_cast_screen">project</string>
-    <string name="keywords_storage">space disk hard drive</string>
-    <string name="keywords_battery">power</string>
-    <string name="keywords_spell_checker">spelling</string>
+    <string name="keywords_storage">space disk hard drive device usage</string>
+    <string name="keywords_battery">power usage charge</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_text_to_speech_output">rate language default speak speaking</string>
-    <string name="keywords_date_and_time">clock</string>
-    <string name="keywords_factory_data_reset">wipe delete</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 military</string>
+    <string name="keywords_factory_data_reset">wipe delete restore clear remove</string>
     <string name="keywords_printing">printer</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>
@@ -5591,7 +5591,7 @@
     <string name="keywords_location_mode">accuracy</string>
     <string name="keywords_accounts">account</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] -->
     <string name="keywords_lockscreen">slide password pattern pin</string>
 
diff --git a/res/xml/language_settings.xml b/res/xml/language_settings.xml
index a6f01aa..5cc8a4a 100644
--- a/res/xml/language_settings.xml
+++ b/res/xml/language_settings.xml
@@ -31,7 +31,6 @@
     <PreferenceScreen
             android:key="spellcheckers_settings"
             android:title="@string/spellcheckers_settings_title"
-            settings:keywords="@string/keywords_spell_checker"
             android:persistent="false"
             />
 
@@ -43,8 +42,7 @@
 
     <PreferenceCategory
             android:key="keyboard_settings_category"
-            android:title="@string/keyboard_settings_category"
-            settings:keywords="@string/keywords_keyboard_and_ime">
+            android:title="@string/keyboard_settings_category">
 
         <PreferenceScreen
                 android:key="current_input_method"
@@ -68,14 +66,12 @@
         <PreferenceScreen
                 android:key="voice_input_settings"
                 android:title="@string/voice_input_settings_title"
-                settings:keywords="@string/keywords_voice_input"
                 android:fragment="com.android.settings.voice.VoiceInputSettings"
                 />
 
         <PreferenceScreen
                 android:key="tts_settings"
                 android:title="@string/tts_settings_title"
-                settings:keywords="@string/keywords_text_to_speech_output"
                 android:fragment="com.android.settings.tts.TextToSpeechSettings"
                 />
 
diff --git a/src/com/android/settings/PrivacySettings.java b/src/com/android/settings/PrivacySettings.java
index 0a9f086..4d52a35 100644
--- a/src/com/android/settings/PrivacySettings.java
+++ b/src/com/android/settings/PrivacySettings.java
@@ -37,6 +37,7 @@
 import android.provider.Settings;
 
 import com.android.settings.search.BaseSearchIndexProvider;
+import com.android.settings.search.Indexable;
 import com.android.settings.search.Indexable.SearchIndexProvider;
 
 import java.util.ArrayList;
@@ -46,7 +47,7 @@
  * Gesture lock pattern settings.
  */
 public class PrivacySettings extends SettingsPreferenceFragment implements
-        DialogInterface.OnClickListener {
+        DialogInterface.OnClickListener, Indexable {
 
     // Vendor specific
     private static final String GSETTINGS_PROVIDER = "com.google.settings";
diff --git a/src/com/android/settings/inputmethod/InputMethodAndLanguageSettings.java b/src/com/android/settings/inputmethod/InputMethodAndLanguageSettings.java
index c529f34..20a273f 100644
--- a/src/com/android/settings/inputmethod/InputMethodAndLanguageSettings.java
+++ b/src/com/android/settings/inputmethod/InputMethodAndLanguageSettings.java
@@ -666,6 +666,7 @@
             indexable.key = KEY_SPELL_CHECKERS;
             indexable.title = context.getString(R.string.spellcheckers_settings_title);
             indexable.screenTitle = screenTitle;
+            indexable.keywords = context.getString(R.string.keywords_spell_checker);
             indexables.add(indexable);
 
             // User dictionary.
@@ -682,6 +683,7 @@
             indexable.key = "keyboard_settings";
             indexable.title = context.getString(R.string.keyboard_settings_category);
             indexable.screenTitle = screenTitle;
+            indexable.keywords = context.getString(R.string.keywords_keyboard_and_ime);
             indexables.add(indexable);
 
             InputMethodSettingValuesWrapper immValues = InputMethodSettingValuesWrapper
@@ -787,6 +789,7 @@
             indexable.key = "voice_input_settings";
             indexable.title = context.getString(R.string.voice_input_settings);
             indexable.screenTitle = screenTitle;
+            indexable.keywords = context.getString(R.string.keywords_voice_input);
             indexables.add(indexable);
 
             // Text-to-speech.
@@ -796,6 +799,7 @@
                 indexable.key = "tts_settings";
                 indexable.title = context.getString(R.string.tts_settings_title);
                 indexable.screenTitle = screenTitle;
+                indexable.keywords = context.getString(R.string.keywords_text_to_speech_output);
                 indexables.add(indexable);
             }