diff options
author | 2014-04-22 19:34:44 +0000 | |
---|---|---|
committer | 2014-04-22 19:34:44 +0000 | |
commit | ce76821dce3d78da7ccbd84cfa12693b2e1caff0 (patch) | |
tree | 8beceec3236b59a822b8179c14191c942fd07017 /java/src/com/android/inputmethod/latin/BinaryDictionary.java | |
parent | 89939b870876b36791a47470ce852e4fcdfe86f2 (diff) | |
download | latinime-ce76821dce3d78da7ccbd84cfa12693b2e1caff0.tar.gz latinime-ce76821dce3d78da7ccbd84cfa12693b2e1caff0.tar.xz latinime-ce76821dce3d78da7ccbd84cfa12693b2e1caff0.zip |
Revert "Support creating BinaryDictionary without creating dict file."
This reverts commit 89939b870876b36791a47470ce852e4fcdfe86f2.
Change-Id: I8ca1b55609ad305a93178063bd88bd1cede872af
Diffstat (limited to 'java/src/com/android/inputmethod/latin/BinaryDictionary.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/BinaryDictionary.java | 36 |
1 files changed, 2 insertions, 34 deletions
diff --git a/java/src/com/android/inputmethod/latin/BinaryDictionary.java b/java/src/com/android/inputmethod/latin/BinaryDictionary.java index 121fd5368..a351ee974 100644 --- a/java/src/com/android/inputmethod/latin/BinaryDictionary.java +++ b/java/src/com/android/inputmethod/latin/BinaryDictionary.java @@ -41,7 +41,6 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.Locale; -import java.util.Map; /** * Implements a static, compacted, binary dictionary of standard words. @@ -124,7 +123,8 @@ public final class BinaryDictionary extends Dictionary { } /** - * Constructs binary dictionary using existing dictionary file. + * Constructor for the binary dictionary. This is supposed to be called from the + * dictionary factory. * @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. @@ -145,38 +145,6 @@ public final class BinaryDictionary extends Dictionary { loadDictionary(filename, offset, length, isUpdatable); } - /** - * Constructs binary dictionary on memory. - * @param filename the name of the file used to flush. - * @param useFullEditDistance whether to use the full edit distance in suggestions - * @param dictType the dictionary type, as a human-readable string - * @param formatVersion the format version of the dictionary - * @param attributeMap the attributes of the dictionary - */ - @UsedForTesting - public BinaryDictionary(final String filename, final boolean useFullEditDistance, - final Locale locale, final String dictType, final long formatVersion, - final Map<String, String> attributeMap) { - super(dictType); - mLocale = locale; - mDictSize = 0; - mDictFilePath = filename; - // On memory dictionary is always updatable. - mIsUpdatable = true; - mHasUpdated = false; - mNativeSuggestOptions.setUseFullEditDistance(useFullEditDistance); - final String[] keyArray = new String[attributeMap.size()]; - final String[] valueArray = new String[attributeMap.size()]; - int index = 0; - for (final String key : attributeMap.keySet()) { - keyArray[index] = key; - valueArray[index] = attributeMap.get(key); - index++; - } - mNativeDict = openOnMemoryNative(formatVersion, locale.toString(), keyArray, valueArray); - } - - static { JniUtils.loadNativeLibrary(); } |