Merge "Remove spacebar preview and arrows"
diff --git a/java/res/values/config.xml b/java/res/values/config.xml
index ad580cc..40cca95 100644
--- a/java/res/values/config.xml
+++ b/java/res/values/config.xml
@@ -76,7 +76,9 @@
         <!-- Modest : Suggestion whose normalized score is greater than this value
              will be subject to auto-correction. -->
         <item>0.22</item>
-        <!-- Aggressive : Suggestion whose normalized score is greater than this value
+        <!-- Aggressive -->
+        <item>0.08</item>
+        <!-- Very Aggressive : Suggestion whose normalized score is greater than this value
              will be subject to auto-correction. -->
         <item>0</item>
     </string-array>
diff --git a/java/res/values/donottranslate.xml b/java/res/values/donottranslate.xml
index 1c198d9..21e6c55 100644
--- a/java/res/values/donottranslate.xml
+++ b/java/res/values/donottranslate.xml
@@ -86,15 +86,18 @@
     <string name="auto_correction_threshold_mode_index_off">0</string>
     <string name="auto_correction_threshold_mode_index_modest">1</string>
     <string name="auto_correction_threshold_mode_index_aggeressive">2</string>
+    <string name="auto_correction_threshold_mode_index_very_aggeressive">3</string>
     <string-array name="auto_correction_threshold_mode_indexes">
       <item>@string/auto_correction_threshold_mode_index_off</item>
       <item>@string/auto_correction_threshold_mode_index_modest</item>
       <item>@string/auto_correction_threshold_mode_index_aggeressive</item>
+      <item>@string/auto_correction_threshold_mode_index_very_aggeressive</item>
     </string-array>
     <string-array name="auto_correction_threshold_modes">
       <item>@string/auto_correction_threshold_mode_off</item>
       <item>@string/auto_correction_threshold_mode_modest</item>
       <item>@string/auto_correction_threshold_mode_aggeressive</item>
+      <item>@string/auto_correction_threshold_mode_very_aggeressive</item>
     </string-array>
 
     <string name="voice_mode_main">0</string>
diff --git a/java/res/values/strings.xml b/java/res/values/strings.xml
index 5d7a1f9..f6e1307 100644
--- a/java/res/values/strings.xml
+++ b/java/res/values/strings.xml
@@ -66,6 +66,9 @@
     <!-- Option to enable auto capitalization of sentences -->
     <string name="auto_cap">Auto-capitalization</string>
 
+    <!-- Option to configure dictionaries -->
+    <string name="configure_dictionaries_title">Configure dictionaries</string>
+
     <!-- Option to enable quick fixes -->
     <string name="quick_fixes">Quick fixes</string>
     <!-- Description for quick fixes -->
@@ -101,6 +104,8 @@
     <string name="auto_correction_threshold_mode_modest">Modest</string>
     <!-- Option to suggest auto correction candidates aggressively. Auto-corrects to a word which has even large edit distance from typed word. [CHAR LIMIT=20] -->
     <string name="auto_correction_threshold_mode_aggeressive">Aggressive</string>
+    <!-- Option to suggest auto correction candidates very aggressively. Auto-corrects to a word which has even large edit distance from typed word. [CHAR LIMIT=20] -->
+    <string name="auto_correction_threshold_mode_very_aggeressive">Very Aggressive</string>
 
     <!-- Option to enable bigram correction -->
     <string name="bigram_suggestion">Bigram suggestions</string>
diff --git a/java/res/xml/prefs.xml b/java/res/xml/prefs.xml
index 5f4a27d..f68ee01 100644
--- a/java/res/xml/prefs.xml
+++ b/java/res/xml/prefs.xml
@@ -68,6 +68,14 @@
     <PreferenceCategory
         android:title="@string/correction_category"
         android:key="correction_settings">
+        <PreferenceScreen
+            android:key="configure_dictionaries_key"
+            android:title="@string/configure_dictionaries_title">
+           <intent
+              android:action="android.intent.action.MAIN"
+              android:targetPackage="com.google.android.inputmethod.latin.dictionarypack"
+              android:targetClass="com.google.android.inputmethod.latin.dictionarypack.DictionarySettings" />
+        </PreferenceScreen>
         <CheckBoxPreference
             android:key="quick_fixes"
             android:title="@string/quick_fixes"
diff --git a/java/src/com/android/inputmethod/latin/Settings.java b/java/src/com/android/inputmethod/latin/Settings.java
index 3ad2a59..6c515c8 100644
--- a/java/src/com/android/inputmethod/latin/Settings.java
+++ b/java/src/com/android/inputmethod/latin/Settings.java
@@ -25,6 +25,7 @@
 import android.app.AlertDialog;
 import android.app.Dialog;
 import android.app.backup.BackupManager;
+import android.content.ComponentName;
 import android.content.Context;
 import android.content.DialogInterface;
 import android.content.Intent;
@@ -65,6 +66,7 @@
     public static final String PREF_SELECTED_LANGUAGES = "selected_languages";
     public static final String PREF_SUBTYPES = "subtype_settings";
 
+    public static final String PREF_CONFIGURE_DICTIONARIES_KEY = "configure_dictionaries_key";
     public static final String PREF_CORRECTION_SETTINGS_KEY = "correction_settings";
     public static final String PREF_QUICK_FIXES = "quick_fixes";
     public static final String PREF_SHOW_SUGGESTIONS_SETTING = "show_suggestions_setting";
@@ -424,6 +426,15 @@
         }
         mKeyPreviewPopupDismissDelay.setEnabled(
                 Settings.Values.isKeyPreviewPopupEnabled(prefs, res));
+
+        final PreferenceScreen dictionaryLink =
+                (PreferenceScreen) findPreference(PREF_CONFIGURE_DICTIONARIES_KEY);
+        final Intent intent = dictionaryLink.getIntent();
+
+        final int number = getPackageManager().queryIntentActivities(intent, 0).size();
+        if (0 >= number) {
+            textCorrectionGroup.removePreference(dictionaryLink);
+        }
     }
 
     @Override