From d1501ea78922289beb4d108fb9624f120e8b4cdb Mon Sep 17 00:00:00 2001 From: Keisuke Kuroyanagi Date: Mon, 2 Dec 2013 20:38:21 +0900 Subject: [PATCH] Make contacts/user dictionary ver2. Change-Id: I10c29bd45fd37d765f115333087e1700dd90570b --- java/src/com/android/inputmethod/latin/DictionaryWriter.java | 4 ++-- .../android/inputmethod/latin/ExpandableBinaryDictionary.java | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/java/src/com/android/inputmethod/latin/DictionaryWriter.java b/java/src/com/android/inputmethod/latin/DictionaryWriter.java index 3df2a2b63..f1a054162 100644 --- a/java/src/com/android/inputmethod/latin/DictionaryWriter.java +++ b/java/src/com/android/inputmethod/latin/DictionaryWriter.java @@ -37,9 +37,9 @@ import java.util.Map; * An in memory dictionary for memorizing entries and writing a binary dictionary. */ public class DictionaryWriter extends AbstractDictionaryWriter { - private static final int BINARY_DICT_VERSION = 3; + private static final int BINARY_DICT_VERSION = 2; private static final FormatSpec.FormatOptions FORMAT_OPTIONS = - new FormatSpec.FormatOptions(BINARY_DICT_VERSION, true /* supportsDynamicUpdate */); + new FormatSpec.FormatOptions(BINARY_DICT_VERSION, false /* supportsDynamicUpdate */); private FusionDictionary mFusionDictionary; diff --git a/java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java b/java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java index 056054273..17cb7151d 100644 --- a/java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java +++ b/java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java @@ -131,7 +131,8 @@ abstract public class ExpandableBinaryDictionary extends Dictionary { protected abstract boolean hasContentChanged(); protected boolean isValidBinaryDictFormatVersion(final int formatVersion) { - return true; + // TODO: Use ver4 format. + return formatVersion == 2; } protected String getFileNameExtentionToOpenDict() {