diff --git a/java/src/com/android/inputmethod/latin/BinaryDictionary.java b/java/src/com/android/inputmethod/latin/BinaryDictionary.java
index 92019c0..61ecec9 100644
--- a/java/src/com/android/inputmethod/latin/BinaryDictionary.java
+++ b/java/src/com/android/inputmethod/latin/BinaryDictionary.java
@@ -64,7 +64,7 @@
     // FULL_EDIT_DISTANCE is a flag that forces the dictionary to use full words
     // when computing edit distance, instead of the default behavior of stopping
     // the evaluation at the size the user typed.
-    public static final Flag FLAG_USE_FULL_EDIT_DISTANCE = new Flag(0x2);
+    public static final int FLAG_USE_FULL_EDIT_DISTANCE = 0x2;
 
     // Can create a new flag from extravalue :
     // public static final Flag FLAG_MYFLAG =
@@ -85,7 +85,7 @@
         FLAG_REQUIRES_FRENCH_LIGATURES_PROCESSING,
     };
 
-    private int mFlags = 0;
+    private final int mFlags;
 
     /**
      * Constructor for the binary dictionary. This is supposed to be called from the
@@ -95,26 +95,20 @@
      * @param filename the name of the file to read through native code.
      * @param offset the offset of the dictionary data within the file.
      * @param length the length of the binary data.
-     * @param flagArray the flags to limit the dictionary to, or null for default.
+     * @param useFullEditDistance whether to use the full edit distance in suggestions
      */
     public BinaryDictionary(final Context context,
-            final String filename, final long offset, final long length, final Flag[] flagArray,
-            Locale locale) {
+            final String filename, final long offset, final long length,
+            final boolean useFullEditDistance, final Locale locale) {
         // Note: at the moment a binary dictionary is always of the "main" type.
         // Initializing this here will help transitioning out of the scheme where
         // the Suggest class knows everything about every single dictionary.
         mDicTypeId = Suggest.DIC_MAIN;
-        // TODO: Stop relying on the state of SubtypeSwitcher, get it as a parameter
-        final RunInLocale<Void> job = new RunInLocale<Void>() {
-            @Override
-            protected Void job(Resources res) {
-                // TODO: remove this when all flags are moved to the native code
-                mFlags = Flag.initFlags(null == flagArray ? ALL_CONFIG_FLAGS : flagArray, context,
-                        SubtypeSwitcher.getInstance());
-                return null;
-            }
-        };
-        job.runInLocale(context.getResources(), locale);
+        if (useFullEditDistance) {
+            mFlags = FLAG_USE_FULL_EDIT_DISTANCE;
+        } else {
+            mFlags = 0;
+        }
         loadDictionary(filename, offset, length);
     }
 
diff --git a/java/src/com/android/inputmethod/latin/DictionaryFactory.java b/java/src/com/android/inputmethod/latin/DictionaryFactory.java
index 79dc3f2..fedb454 100644
--- a/java/src/com/android/inputmethod/latin/DictionaryFactory.java
+++ b/java/src/com/android/inputmethod/latin/DictionaryFactory.java
@@ -43,11 +43,11 @@
      * @param context application context for reading resources
      * @param locale the locale for which to create the dictionary
      * @param fallbackResId the id of the resource to use as a fallback if no pack is found
-     * @param flagArray an array of flags to use
+     * @param useFullEditDistance whether to use the full edit distance in suggestions
      * @return an initialized instance of DictionaryCollection
      */
     public static DictionaryCollection createDictionaryFromManager(final Context context,
-            final Locale locale, final int fallbackResId, final Flag[] flagArray) {
+            final Locale locale, final int fallbackResId, final boolean useFullEditDistance) {
         if (null == locale) {
             Log.e(TAG, "No locale defined for dictionary");
             return new DictionaryCollection(createBinaryDictionary(context, fallbackResId, locale));
@@ -59,8 +59,8 @@
         if (null != assetFileList) {
             for (final AssetFileAddress f : assetFileList) {
                 final BinaryDictionary binaryDictionary =
-                        new BinaryDictionary(context, f.mFilename, f.mOffset, f.mLength, flagArray,
-                                locale);
+                        new BinaryDictionary(context, f.mFilename, f.mOffset, f.mLength,
+                                useFullEditDistance, locale);
                 if (binaryDictionary.isValidDictionary()) {
                     dictList.add(binaryDictionary);
                 }
@@ -86,7 +86,8 @@
      */
     public static DictionaryCollection createDictionaryFromManager(final Context context,
             final Locale locale, final int fallbackResId) {
-        return createDictionaryFromManager(context, locale, fallbackResId, null);
+        return createDictionaryFromManager(context, locale, fallbackResId,
+                false /* useFullEditDistance */);
     }
 
     /**
@@ -119,8 +120,8 @@
                 Log.e(TAG, "sourceDir is not a file: " + sourceDir);
                 return null;
             }
-            return new BinaryDictionary(context,
-                    sourceDir, afd.getStartOffset(), afd.getLength(), null, locale);
+            return new BinaryDictionary(context, sourceDir, afd.getStartOffset(), afd.getLength(),
+                    false /* useFullEditDistance */, locale);
         } catch (android.content.res.Resources.NotFoundException e) {
             Log.e(TAG, "Could not find the resource. resId=" + resId);
             return null;
@@ -141,14 +142,14 @@
      * @param dictionary the file to read
      * @param startOffset the offset in the file where the data starts
      * @param length the length of the data
-     * @param flagArray the flags to use with this data for testing
+     * @param useFullEditDistance whether to use the full edit distance in suggestions
      * @return the created dictionary, or null.
      */
     public static Dictionary createDictionaryForTest(Context context, File dictionary,
-            long startOffset, long length, Flag[] flagArray, Locale locale) {
+            long startOffset, long length, final boolean useFullEditDistance, Locale locale) {
         if (dictionary.isFile()) {
             return new BinaryDictionary(context, dictionary.getAbsolutePath(), startOffset, length,
-                    flagArray, locale);
+                    useFullEditDistance, locale);
         } else {
             Log.e(TAG, "Could not find the file. path=" + dictionary.getAbsolutePath());
             return null;
diff --git a/java/src/com/android/inputmethod/latin/Suggest.java b/java/src/com/android/inputmethod/latin/Suggest.java
index 44c4bc7..cbdc680 100644
--- a/java/src/com/android/inputmethod/latin/Suggest.java
+++ b/java/src/com/android/inputmethod/latin/Suggest.java
@@ -108,11 +108,18 @@
         initAsynchronously(context, dictionaryResId, locale);
     }
 
+    // TODO: remove when the tests are updated
     /* package for test */ Suggest(final Context context, final File dictionary,
             final long startOffset, final long length, final Flag[] flagArray,
             final Locale locale) {
         initSynchronously(context, DictionaryFactory.createDictionaryForTest(context, dictionary,
-                startOffset, length, flagArray, locale), locale);
+                startOffset, length /* useFullEditDistance */, false, locale), locale);
+    }
+
+    /* package for test */ Suggest(final Context context, final File dictionary,
+            final long startOffset, final long length, final Locale locale) {
+        initSynchronously(context, DictionaryFactory.createDictionaryForTest(context, dictionary,
+                startOffset, length /* useFullEditDistance */, false, locale), locale);
     }
 
     private void initWhitelistAndAutocorrectAndPool(final Context context, final Locale locale) {
diff --git a/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java b/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java
index 1fc945f..86a0824 100644
--- a/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java
+++ b/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java
@@ -68,17 +68,6 @@
     private static final int CAPITALIZE_ALL = 2; // All caps
 
     private final static String[] EMPTY_STRING_ARRAY = new String[0];
-    private final static Flag[] USE_FULL_EDIT_DISTANCE_FLAG_ARRAY;
-    static {
-        // See BinaryDictionary.java for an explanation of these flags
-        // Specifially, ALL_CONFIG_FLAGS means that we want to consider all flags with the
-        // current dictionary configuration - for example, consider the UMLAUT flag
-        // so that it will be turned on for German dictionaries and off for others.
-        USE_FULL_EDIT_DISTANCE_FLAG_ARRAY = Arrays.copyOf(BinaryDictionary.ALL_CONFIG_FLAGS,
-                BinaryDictionary.ALL_CONFIG_FLAGS.length + 1);
-        USE_FULL_EDIT_DISTANCE_FLAG_ARRAY[BinaryDictionary.ALL_CONFIG_FLAGS.length] =
-                BinaryDictionary.FLAG_USE_FULL_EDIT_DISTANCE;
-    }
     private Map<String, DictionaryPool> mDictionaryPools =
             Collections.synchronizedMap(new TreeMap<String, DictionaryPool>());
     private Map<String, Dictionary> mUserDictionaries =
@@ -402,7 +391,7 @@
         final int fallbackResourceId = DictionaryFactory.getMainDictionaryResourceId(resources);
         final DictionaryCollection dictionaryCollection =
                 DictionaryFactory.createDictionaryFromManager(this, locale, fallbackResourceId,
-                        USE_FULL_EDIT_DISTANCE_FLAG_ARRAY);
+                        true /* useFullEditDistance */);
         final String localeStr = locale.toString();
         Dictionary userDictionary = mUserDictionaries.get(localeStr);
         if (null == userDictionary) {
