diff --git a/java/src/com/android/inputmethod/latin/BinaryDictionary.java b/java/src/com/android/inputmethod/latin/BinaryDictionary.java
index 61ecec9..deb94a4 100644
--- a/java/src/com/android/inputmethod/latin/BinaryDictionary.java
+++ b/java/src/com/android/inputmethod/latin/BinaryDictionary.java
@@ -61,11 +61,6 @@
     public static final Flag FLAG_REQUIRES_FRENCH_LIGATURES_PROCESSING =
             new Flag(R.bool.config_require_ligatures_processing, 0x4);
 
-    // 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 int FLAG_USE_FULL_EDIT_DISTANCE = 0x2;
-
     // Can create a new flag from extravalue :
     // public static final Flag FLAG_MYFLAG =
     //         new Flag("my_flag", 0x02);
@@ -85,7 +80,7 @@
         FLAG_REQUIRES_FRENCH_LIGATURES_PROCESSING,
     };
 
-    private final int mFlags;
+    private final boolean mUseFullEditDistance;
 
     /**
      * Constructor for the binary dictionary. This is supposed to be called from the
@@ -104,11 +99,7 @@
         // Initializing this here will help transitioning out of the scheme where
         // the Suggest class knows everything about every single dictionary.
         mDicTypeId = Suggest.DIC_MAIN;
-        if (useFullEditDistance) {
-            mFlags = FLAG_USE_FULL_EDIT_DISTANCE;
-        } else {
-            mFlags = 0;
-        }
+        mUseFullEditDistance = useFullEditDistance;
         loadDictionary(filename, offset, length);
     }
 
@@ -121,8 +112,8 @@
     private native void closeNative(long dict);
     private native boolean isValidWordNative(long dict, char[] word, int wordLength);
     private native int getSuggestionsNative(long dict, long proximityInfo, int[] xCoordinates,
-            int[] yCoordinates, int[] inputCodes, int codesSize, int flags, char[] outputChars,
-            int[] scores);
+            int[] yCoordinates, int[] inputCodes, int codesSize, boolean useFullEditDistance,
+            char[] outputChars, int[] scores);
     private native int getBigramsNative(long dict, char[] prevWord, int prevWordLength,
             int[] inputCodes, int inputCodesLength, char[] outputChars, int[] scores,
             int maxWordLength, int maxBigrams);
@@ -214,7 +205,7 @@
         return getSuggestionsNative(
                 mNativeDict, proximityInfo.getNativeProximityInfo(),
                 codes.getXCoordinates(), codes.getYCoordinates(), mInputCodes, codesSize,
-                mFlags, outputChars, scores);
+                mUseFullEditDistance, outputChars, scores);
     }
 
     public static double calcNormalizedScore(String before, String after, int score) {
diff --git a/java/src/com/android/inputmethod/latin/Suggest.java b/java/src/com/android/inputmethod/latin/Suggest.java
index cbdc680..fa6664b 100644
--- a/java/src/com/android/inputmethod/latin/Suggest.java
+++ b/java/src/com/android/inputmethod/latin/Suggest.java
@@ -108,14 +108,6 @@
         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 /* 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,
diff --git a/native/jni/com_android_inputmethod_latin_BinaryDictionary.cpp b/native/jni/com_android_inputmethod_latin_BinaryDictionary.cpp
index 20e44c2..f3dd206 100644
--- a/native/jni/com_android_inputmethod_latin_BinaryDictionary.cpp
+++ b/native/jni/com_android_inputmethod_latin_BinaryDictionary.cpp
@@ -127,7 +127,7 @@
 
 static int latinime_BinaryDictionary_getSuggestions(JNIEnv *env, jobject object, jlong dict,
         jlong proximityInfo, jintArray xCoordinatesArray, jintArray yCoordinatesArray,
-        jintArray inputArray, jint arraySize, jint flags,
+        jintArray inputArray, jint arraySize, jboolean useFullEditDistance,
         jcharArray outputArray, jintArray frequencyArray) {
     Dictionary *dictionary = (Dictionary*)dict;
     if (!dictionary) return 0;
@@ -141,7 +141,7 @@
     jchar *outputChars = env->GetCharArrayElements(outputArray, 0);
 
     int count = dictionary->getSuggestions(pInfo, xCoordinates, yCoordinates, inputCodes,
-            arraySize, flags, (unsigned short*) outputChars, frequencies);
+            arraySize, useFullEditDistance, (unsigned short*) outputChars, frequencies);
 
     env->ReleaseIntArrayElements(frequencyArray, frequencies, 0);
     env->ReleaseIntArrayElements(inputArray, inputCodes, JNI_ABORT);
@@ -241,7 +241,7 @@
 static JNINativeMethod sMethods[] = {
     {"openNative", "(Ljava/lang/String;JJIIII)J", (void*)latinime_BinaryDictionary_open},
     {"closeNative", "(J)V", (void*)latinime_BinaryDictionary_close},
-    {"getSuggestionsNative", "(JJ[I[I[III[C[I)I", (void*)latinime_BinaryDictionary_getSuggestions},
+    {"getSuggestionsNative", "(JJ[I[I[IIZ[C[I)I", (void*)latinime_BinaryDictionary_getSuggestions},
     {"isValidWordNative", "(J[CI)Z", (void*)latinime_BinaryDictionary_isValidWord},
     {"getBigramsNative", "(J[CI[II[C[III)I", (void*)latinime_BinaryDictionary_getBigrams},
     {"calcNormalizedScoreNative", "([CI[CII)D",
diff --git a/native/jni/src/dictionary.h b/native/jni/src/dictionary.h
index f026a9e..5638bbf 100644
--- a/native/jni/src/dictionary.h
+++ b/native/jni/src/dictionary.h
@@ -33,10 +33,11 @@
             int fullWordMultiplier, int maxWordLength, int maxWords);
 
     int getSuggestions(ProximityInfo *proximityInfo, int *xcoordinates, int *ycoordinates,
-            int *codes, int codesSize, int flags, unsigned short *outWords, int *frequencies) {
+            int *codes, int codesSize, bool useFullEditDistance, unsigned short *outWords,
+            int *frequencies) {
         return mUnigramDictionary->getSuggestions(proximityInfo, mWordsPriorityQueuePool,
                 mCorrection, xcoordinates, ycoordinates, codes,
-                codesSize, flags, outWords, frequencies);
+                codesSize, useFullEditDistance, outWords, frequencies);
     }
 
     int getBigrams(unsigned short *word, int length, int *codes, int codesSize,
diff --git a/native/jni/src/unigram_dictionary.cpp b/native/jni/src/unigram_dictionary.cpp
index 3c1cb99..ab8570e 100644
--- a/native/jni/src/unigram_dictionary.cpp
+++ b/native/jni/src/unigram_dictionary.cpp
@@ -98,7 +98,7 @@
 void UnigramDictionary::getWordWithDigraphSuggestionsRec(ProximityInfo *proximityInfo,
         const int *xcoordinates, const int *ycoordinates, const int *codesBuffer,
         int *xCoordinatesBuffer, int *yCoordinatesBuffer,
-        const int codesBufferSize, const int flags, const int *codesSrc,
+        const int codesBufferSize, const bool useFullEditDistance, const int *codesSrc,
         const int codesRemain, const int currentDepth, int *codesDest, Correction *correction,
         WordsPriorityQueuePool *queuePool,
         const digraph_t* const digraphs, const unsigned int digraphsSize) {
@@ -126,8 +126,8 @@
                 codesDest[(i - 1) * (BYTES_IN_ONE_CHAR / sizeof(codesDest[0]))] =
                         replacementCodePoint;
                 getWordWithDigraphSuggestionsRec(proximityInfo, xcoordinates, ycoordinates,
-                        codesBuffer, xCoordinatesBuffer, yCoordinatesBuffer, codesBufferSize, flags,
-                        codesSrc + i + 1, codesRemain - i - 1,
+                        codesBuffer, xCoordinatesBuffer, yCoordinatesBuffer, codesBufferSize,
+                        useFullEditDistance, codesSrc + i + 1, codesRemain - i - 1,
                         currentDepth + 1, codesDest + i, correction,
                         queuePool, digraphs, digraphsSize);
 
@@ -136,8 +136,8 @@
                 // In our example, after "pru" in the buffer copy the "e", and continue on "fen"
                 memcpy(codesDest + i, codesSrc + i, BYTES_IN_ONE_CHAR);
                 getWordWithDigraphSuggestionsRec(proximityInfo, xcoordinates, ycoordinates,
-                        codesBuffer, xCoordinatesBuffer, yCoordinatesBuffer, codesBufferSize, flags,
-                        codesSrc + i, codesRemain - i, currentDepth + 1,
+                        codesBuffer, xCoordinatesBuffer, yCoordinatesBuffer, codesBufferSize,
+                        useFullEditDistance, codesSrc + i, codesRemain - i, currentDepth + 1,
                         codesDest + i, correction, queuePool,
                         digraphs, digraphsSize);
                 return;
@@ -160,14 +160,14 @@
     }
 
     getWordSuggestions(proximityInfo, xCoordinatesBuffer, yCoordinatesBuffer, codesBuffer,
-            startIndex + codesRemain, flags, correction,
+            startIndex + codesRemain, useFullEditDistance, correction,
             queuePool);
 }
 
 int UnigramDictionary::getSuggestions(ProximityInfo *proximityInfo,
         WordsPriorityQueuePool *queuePool, Correction *correction, const int *xcoordinates,
-        const int *ycoordinates, const int *codes, const int codesSize, const int flags,
-        unsigned short *outWords, int *frequencies) {
+        const int *ycoordinates, const int *codes, const int codesSize,
+        const bool useFullEditDistance, unsigned short *outWords, int *frequencies) {
 
     queuePool->clearAll();
     Correction* masterCorrection = correction;
@@ -178,8 +178,8 @@
         int yCoordinatesBuffer[codesSize];
         getWordWithDigraphSuggestionsRec(proximityInfo, xcoordinates, ycoordinates, codesBuffer,
                 xCoordinatesBuffer, yCoordinatesBuffer,
-                codesSize, flags, codes, codesSize, 0, codesBuffer, masterCorrection, queuePool,
-                GERMAN_UMLAUT_DIGRAPHS,
+                codesSize, useFullEditDistance, codes, codesSize, 0, codesBuffer, masterCorrection,
+                queuePool, GERMAN_UMLAUT_DIGRAPHS,
                 sizeof(GERMAN_UMLAUT_DIGRAPHS) / sizeof(GERMAN_UMLAUT_DIGRAPHS[0]));
     } else if (BinaryFormat::REQUIRES_FRENCH_LIGATURES_PROCESSING & FLAGS) {
         int codesBuffer[getCodesBufferSize(codes, codesSize)];
@@ -187,12 +187,12 @@
         int yCoordinatesBuffer[codesSize];
         getWordWithDigraphSuggestionsRec(proximityInfo, xcoordinates, ycoordinates, codesBuffer,
                 xCoordinatesBuffer, yCoordinatesBuffer,
-                codesSize, flags, codes, codesSize, 0, codesBuffer, masterCorrection, queuePool,
-                FRENCH_LIGATURES_DIGRAPHS,
+                codesSize, useFullEditDistance, codes, codesSize, 0, codesBuffer, masterCorrection,
+                queuePool, FRENCH_LIGATURES_DIGRAPHS,
                 sizeof(FRENCH_LIGATURES_DIGRAPHS) / sizeof(FRENCH_LIGATURES_DIGRAPHS[0]));
     } else { // Normal processing
-        getWordSuggestions(proximityInfo, xcoordinates, ycoordinates, codes, codesSize, flags,
-                masterCorrection, queuePool);
+        getWordSuggestions(proximityInfo, xcoordinates, ycoordinates, codes, codesSize,
+                useFullEditDistance, masterCorrection, queuePool);
     }
 
     PROF_START(20);
@@ -225,7 +225,7 @@
 
 void UnigramDictionary::getWordSuggestions(ProximityInfo *proximityInfo,
         const int *xcoordinates, const int *ycoordinates, const int *codes,
-        const int inputLength, const int flags, Correction *correction,
+        const int inputLength, const bool useFullEditDistance, Correction *correction,
         WordsPriorityQueuePool *queuePool) {
 
     PROF_OPEN;
@@ -233,7 +233,6 @@
     PROF_END(0);
 
     PROF_START(1);
-    const bool useFullEditDistance = USE_FULL_EDIT_DISTANCE & flags;
     getOneWordSuggestions(proximityInfo, xcoordinates, ycoordinates, codes, useFullEditDistance,
             inputLength, correction, queuePool);
     PROF_END(1);
diff --git a/native/jni/src/unigram_dictionary.h b/native/jni/src/unigram_dictionary.h
index de6637b..4479cd9 100644
--- a/native/jni/src/unigram_dictionary.h
+++ b/native/jni/src/unigram_dictionary.h
@@ -75,20 +75,21 @@
     int getBigramPosition(int pos, unsigned short *word, int offset, int length) const;
     int getSuggestions(ProximityInfo *proximityInfo, WordsPriorityQueuePool *queuePool,
             Correction *correction, const int *xcoordinates,
-            const int *ycoordinates, const int *codes, const int codesSize, const int flags,
-            unsigned short *outWords, int *frequencies);
+            const int *ycoordinates, const int *codes, const int codesSize,
+            const bool useFullEditDistance, unsigned short *outWords, int *frequencies);
     virtual ~UnigramDictionary();
 
  private:
     void getWordSuggestions(ProximityInfo *proximityInfo, const int *xcoordinates,
             const int *ycoordinates, const int *codes, const int inputLength,
-            const int flags, Correction *correction, WordsPriorityQueuePool *queuePool);
+            const bool useFullEditDistance, Correction *correction,
+            WordsPriorityQueuePool *queuePool);
     int getDigraphReplacement(const int *codes, const int i, const int codesSize,
             const digraph_t* const digraphs, const unsigned int digraphsSize) const;
     void getWordWithDigraphSuggestionsRec(ProximityInfo *proximityInfo,
         const int *xcoordinates, const int* ycoordinates, const int *codesBuffer,
         int *xCoordinatesBuffer, int *yCoordinatesBuffer,
-        const int codesBufferSize, const int flags, const int* codesSrc,
+        const int codesBufferSize, const bool useFullEditDistance, const int* codesSrc,
         const int codesRemain, const int currentDepth, int* codesDest, Correction *correction,
         WordsPriorityQueuePool* queuePool, const digraph_t* const digraphs,
         const unsigned int digraphsSize);
@@ -145,13 +146,6 @@
     const int MAX_DIGRAPH_SEARCH_DEPTH;
     const int FLAGS;
 
-    // Flags for special processing
-    // Those *must* match the flags in BinaryDictionary.Flags.ALL_FLAGS in BinaryDictionary.java
-    // or something very bad (like, the apocalypse) will happen.
-    // Please update both at the same time.
-    enum {
-        USE_FULL_EDIT_DISTANCE = 0x2,
-    };
     static const digraph_t GERMAN_UMLAUT_DIGRAPHS[];
     static const digraph_t FRENCH_LIGATURES_DIGRAPHS[];
 
