diff --git a/java/src/com/android/inputmethod/latin/BinaryDictionary.java b/java/src/com/android/inputmethod/latin/BinaryDictionary.java
index 4425d7d..f36c9e8 100644
--- a/java/src/com/android/inputmethod/latin/BinaryDictionary.java
+++ b/java/src/com/android/inputmethod/latin/BinaryDictionary.java
@@ -78,13 +78,15 @@
      * @param length the length of the binary data.
      * @param useFullEditDistance whether to use the full edit distance in suggestions
      * @param dictType the dictionary type, as a human-readable string
+     * @param isUpdatable whether to open the dictionary file in writable mode.
      */
     public BinaryDictionary(final String filename, final long offset, final long length,
-            final boolean useFullEditDistance, final Locale locale, final String dictType) {
+            final boolean useFullEditDistance, final Locale locale, final String dictType,
+            final boolean isUpdatable) {
         super(dictType);
         mLocale = locale;
         mNativeSuggestOptions.setUseFullEditDistance(useFullEditDistance);
-        loadDictionary(filename, offset, length);
+        loadDictionary(filename, offset, length, isUpdatable);
     }
 
     static {
@@ -106,8 +108,8 @@
 
     // TODO: Move native dict into session
     private final void loadDictionary(final String path, final long startOffset,
-            final long length) {
-        mNativeDict = openNative(path, startOffset, length, false /* isUpdatable */);
+            final long length, final boolean isUpdatable) {
+        mNativeDict = openNative(path, startOffset, length, isUpdatable);
     }
 
     @Override
diff --git a/java/src/com/android/inputmethod/latin/DictionaryFactory.java b/java/src/com/android/inputmethod/latin/DictionaryFactory.java
index 5b98613..3721132 100644
--- a/java/src/com/android/inputmethod/latin/DictionaryFactory.java
+++ b/java/src/com/android/inputmethod/latin/DictionaryFactory.java
@@ -60,7 +60,8 @@
         if (null != assetFileList) {
             for (final AssetFileAddress f : assetFileList) {
                 final BinaryDictionary binaryDictionary = new BinaryDictionary(f.mFilename,
-                        f.mOffset, f.mLength, useFullEditDistance, locale, Dictionary.TYPE_MAIN);
+                        f.mOffset, f.mLength, useFullEditDistance, locale, Dictionary.TYPE_MAIN,
+                        false /* isUpdatable */);
                 if (binaryDictionary.isValidDictionary()) {
                     dictList.add(binaryDictionary);
                 }
@@ -113,7 +114,8 @@
                 return null;
             }
             return new BinaryDictionary(sourceDir, afd.getStartOffset(), afd.getLength(),
-                    false /* useFullEditDistance */, locale, Dictionary.TYPE_MAIN);
+                    false /* useFullEditDistance */, locale, Dictionary.TYPE_MAIN,
+                    false /* isUpdatable */);
         } catch (android.content.res.Resources.NotFoundException e) {
             Log.e(TAG, "Could not find the resource");
             return null;
@@ -142,7 +144,7 @@
         for (final AssetFileAddress address : dictionaryList) {
             final BinaryDictionary binaryDictionary = new BinaryDictionary(address.mFilename,
                     address.mOffset, address.mLength, useFullEditDistance, locale,
-                    Dictionary.TYPE_MAIN);
+                    Dictionary.TYPE_MAIN, false /* isUpdatable */);
             dictionaryCollection.addDictionary(binaryDictionary);
         }
         return dictionaryCollection;
diff --git a/java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java b/java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java
index f357e2a..9cdb86c 100644
--- a/java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java
+++ b/java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java
@@ -286,7 +286,7 @@
 
         // Build the new binary dictionary
         final BinaryDictionary newBinaryDictionary = new BinaryDictionary(filename, 0, length,
-                true /* useFullEditDistance */, null, mDictType);
+                true /* useFullEditDistance */, null, mDictType, false /* isUpdatable */);
 
         if (mBinaryDictionary != null) {
             // Ensure all threads accessing the current dictionary have finished before swapping in
