Merge "Avoid disk writes on UI thread." into honeycomb
diff --git a/java/res/values/strings.xml b/java/res/values/strings.xml
index f3805fd..12534cb 100644
--- a/java/res/values/strings.xml
+++ b/java/res/values/strings.xml
@@ -69,7 +69,7 @@
     <!-- Option to enable auto correction [CHAR LIMIT=20]-->
     <string name="auto_correction">Auto correction</string>
     <!-- Description for auto correction [CHAR LIMIT=35] -->
-    <string name="auto_correction_summary">Spacebar and punctuation automatically insert highlighted word</string>
+    <string name="auto_correction_summary">Spacebar and punctuation automatically correct mistyped words</string>
     <!-- Option to disable auto correction. [CHAR LIMIT=20] -->
     <string name="auto_correction_threshold_mode_off">Off</string>
     <!-- Option to suggest auto correction candidates modestly. Auto-corrects only to a word which has small edit distance from typed word. [CHAR LIMIT=20] -->
diff --git a/java/src/com/android/inputmethod/latin/Settings.java b/java/src/com/android/inputmethod/latin/Settings.java
index 653dbea..12338ce 100644
--- a/java/src/com/android/inputmethod/latin/Settings.java
+++ b/java/src/com/android/inputmethod/latin/Settings.java
@@ -75,6 +75,7 @@
     private CheckBoxPreference mQuickFixes;
     private ListPreference mVoicePreference;
     private ListPreference mSettingsKeyPreference;
+    private ListPreference mShowCorrectionSuggestionsPreference;
     private ListPreference mAutoCorrectionThreshold;
     private CheckBoxPreference mBigramSuggestion;
     private boolean mVoiceOn;
@@ -102,6 +103,8 @@
         mQuickFixes = (CheckBoxPreference) findPreference(PREF_QUICK_FIXES);
         mVoicePreference = (ListPreference) findPreference(PREF_VOICE_SETTINGS_KEY);
         mSettingsKeyPreference = (ListPreference) findPreference(PREF_SETTINGS_KEY);
+        mShowCorrectionSuggestionsPreference =
+                (ListPreference) findPreference(PREF_SHOW_SUGGESTIONS_SETTING);
         SharedPreferences prefs = getPreferenceManager().getSharedPreferences();
         prefs.registerOnSharedPreferenceChangeListener(this);
 
@@ -188,6 +191,7 @@
             updateVoiceModeSummary();
         }
         updateSettingsKeySummary();
+        updateShowCorrectionSuggestionsSummary();
     }
 
     @Override
@@ -212,6 +216,7 @@
                 .equals(mVoiceModeOff));
         updateVoiceModeSummary();
         updateSettingsKeySummary();
+        updateShowCorrectionSuggestionsSummary();
     }
 
     @Override
@@ -230,6 +235,13 @@
         return false;
     }
 
+    private void updateShowCorrectionSuggestionsSummary() {
+        mShowCorrectionSuggestionsPreference.setSummary(
+                getResources().getStringArray(R.array.prefs_suggestion_visibilities)
+                [mShowCorrectionSuggestionsPreference.findIndexOfValue(
+                        mShowCorrectionSuggestionsPreference.getValue())]);
+    }
+
     private void updateSettingsKeySummary() {
         mSettingsKeyPreference.setSummary(
                 getResources().getStringArray(R.array.settings_key_modes)