diff options
author | 2014-01-17 10:30:16 -0800 | |
---|---|---|
committer | 2014-01-17 10:30:16 -0800 | |
commit | ed95d79cc4c7f4646a388005f99a195b4794623b (patch) | |
tree | 6705757ec8aa839553764c9453f25e4f3eabcf23 /java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java | |
parent | f4bf620502198202b98882254d7a355e1f5a6e45 (diff) | |
download | latinime-ed95d79cc4c7f4646a388005f99a195b4794623b.tar.gz latinime-ed95d79cc4c7f4646a388005f99a195b4794623b.tar.xz latinime-ed95d79cc4c7f4646a388005f99a195b4794623b.zip |
Make contacts dict and user dict version 4.
Bug: 12515251
Change-Id: I0b332e03b9102957bffaea56d4de17b9ee3cef23
Diffstat (limited to 'java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java b/java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java index ecef20efc..8e1675b2a 100644 --- a/java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java +++ b/java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java @@ -136,12 +136,8 @@ abstract public class ExpandableBinaryDictionary extends Dictionary { */ protected abstract boolean hasContentChanged(); - protected boolean matchesExpectedBinaryDictFormatVersionForThisType(final int formatVersion) { - // This class is using format 2 because it's used by the User and Contacts dictionary - // only, which right now use format 2 (dicts using format 4 use Decaying*, which overrides - // this method). - // TODO: Migrate these dicts to ver4 format, and remove this function. - return formatVersion == FormatSpec.VERSION2; + private boolean matchesExpectedBinaryDictFormatVersionForThisType(final int formatVersion) { + return formatVersion == FormatSpec.VERSION4; } public boolean isValidDictionary() { @@ -194,12 +190,12 @@ abstract public class ExpandableBinaryDictionary extends Dictionary { } } - private static AbstractDictionaryWriter getDictionaryWriter(final Context context, + private static AbstractDictionaryWriter getDictionaryWriter( final boolean isDynamicPersonalizationDictionary) { if (isDynamicPersonalizationDictionary) { return null; } else { - return new DictionaryWriter(context); + return new DictionaryWriter(); } } @@ -233,7 +229,7 @@ abstract public class ExpandableBinaryDictionary extends Dictionary { mBinaryDictionary = null; mDictNameDictionaryUpdateController = getDictionaryUpdateController(dictName); // Currently, only dynamic personalization dictionary is updatable. - mDictionaryWriter = getDictionaryWriter(context, isUpdatable); + mDictionaryWriter = getDictionaryWriter(isUpdatable); } protected static String getDictNameWithLocale(final String name, final Locale locale) { |