Simplify text correction settings in latin IME.

Conditionally remove the "Quick fixes", "Bigram suggestions" and
"Usability study mode" options, depending on configuration.
When disabled, have the quick fixes and bigram option become
false if autocorrect is off, and true otherwise.
Also reorder options to bring "Auto correction" above "Show
suggestions".

bug: 3282448

Change-Id: Ib7fd928be417a816ef9e21423a531773069b7468
diff --git a/java/res/values-xlarge/config.xml b/java/res/values-xlarge/config.xml
index d686460..004b39b 100644
--- a/java/res/values-xlarge/config.xml
+++ b/java/res/values-xlarge/config.xml
@@ -24,6 +24,8 @@
     <bool name="config_enable_show_voice_key_option">false</bool>
     <bool name="config_enable_show_popup_on_keypress_option">false</bool>
     <bool name="config_enable_show_recorrection_option">false</bool>
+    <bool name="config_enable_quick_fixes_option">false</bool>
+    <bool name="config_enable_bigram_suggestions_option">false</bool>
     <bool name="config_candidate_highlight_font_color_enabled">false</bool>
     <bool name="config_swipe_down_dismiss_keyboard_enabled">false</bool>
     <bool name="config_sliding_key_input_enabled">false</bool>
diff --git a/java/res/values/config.xml b/java/res/values/config.xml
index a523635..6a1b27a 100644
--- a/java/res/values/config.xml
+++ b/java/res/values/config.xml
@@ -27,12 +27,18 @@
     <bool name="config_enable_show_voice_key_option">true</bool>
     <bool name="config_enable_show_popup_on_keypress_option">true</bool>
     <bool name="config_enable_show_recorrection_option">true</bool>
+    <bool name="config_enable_quick_fixes_option">true</bool>
+    <bool name="config_enable_bigram_suggestions_option">true</bool>
+    <bool name="config_enable_usability_study_mode_option">false</bool>
     <bool name="config_candidate_highlight_font_color_enabled">true</bool>
     <bool name="config_swipe_down_dismiss_keyboard_enabled">true</bool>
     <bool name="config_sliding_key_input_enabled">true</bool>
     <bool name="config_digit_popup_characters_enabled">true</bool>
     <!-- Whether or not Popup on key press is enabled by default -->
     <bool name="config_default_popup_preview">true</bool>
+    <!-- Default values for whether quick fixes and bigram suggestions are activated -->
+    <bool name="config_default_quick_fixes">true</bool>
+    <bool name="config_default_bigram_suggestions">true</bool>
     <bool name="config_use_spacebar_language_switcher">true</bool>
     <!-- The language is never displayed if == 0, always displayed if < 0 -->
     <integer name="config_delay_before_fadeout_language_on_spacebar">-1</integer>
diff --git a/java/res/xml/prefs.xml b/java/res/xml/prefs.xml
index 0291885..9ea801e 100644
--- a/java/res/xml/prefs.xml
+++ b/java/res/xml/prefs.xml
@@ -94,16 +94,6 @@
             />
 
         <ListPreference
-            android:key="show_suggestions_setting"
-            android:summary="@string/prefs_show_suggestions_summary"
-            android:title="@string/prefs_show_suggestions"
-            android:persistent="true"
-            android:entryValues="@array/prefs_suggestion_visibility_values"
-            android:entries="@array/prefs_suggestion_visibilities"
-            android:defaultValue="@string/prefs_suggestion_visibility_default_value"
-            />
-
-        <ListPreference
             android:key="auto_correction_threshold"
             android:title="@string/auto_correction"
             android:summary="@string/auto_correction_summary"
@@ -113,6 +103,16 @@
             android:defaultValue="@string/auto_correction_threshold_mode_index_modest"
             />
 
+        <ListPreference
+            android:key="show_suggestions_setting"
+            android:summary="@string/prefs_show_suggestions_summary"
+            android:title="@string/prefs_show_suggestions"
+            android:persistent="true"
+            android:entryValues="@array/prefs_suggestion_visibility_values"
+            android:entries="@array/prefs_suggestion_visibilities"
+            android:defaultValue="@string/prefs_suggestion_visibility_default_value"
+            />
+
         <CheckBoxPreference
             android:key="bigram_suggestion"
             android:title="@string/bigram_suggestion"