Merge "Start using Ver4 dictionary format."
This commit is contained in:
commit
3c7b603c46
1 changed files with 5 additions and 3 deletions
|
@ -60,7 +60,7 @@ abstract public class ExpandableBinaryDictionary extends Dictionary {
|
||||||
*/
|
*/
|
||||||
protected static final int MAX_WORD_LENGTH = Constants.DICTIONARY_MAX_WORD_LENGTH;
|
protected static final int MAX_WORD_LENGTH = Constants.DICTIONARY_MAX_WORD_LENGTH;
|
||||||
|
|
||||||
private static final int DICTIONARY_FORMAT_VERSION = 3;
|
private static final int DICTIONARY_FORMAT_VERSION = 4;
|
||||||
|
|
||||||
private static final String SUPPORTS_DYNAMIC_UPDATE =
|
private static final String SUPPORTS_DYNAMIC_UPDATE =
|
||||||
FormatSpec.FileHeader.ATTRIBUTE_VALUE_TRUE;
|
FormatSpec.FileHeader.ATTRIBUTE_VALUE_TRUE;
|
||||||
|
@ -238,7 +238,8 @@ abstract public class ExpandableBinaryDictionary extends Dictionary {
|
||||||
public void run() {
|
public void run() {
|
||||||
if (mDictionaryWriter == null) {
|
if (mDictionaryWriter == null) {
|
||||||
mBinaryDictionary.close();
|
mBinaryDictionary.close();
|
||||||
final File file = new File(mContext.getFilesDir(), mFilename);
|
final File file = new File(mContext.getFilesDir(), mFilename + "/"
|
||||||
|
+ FormatSpec.TRIE_FILE_EXTENSION);
|
||||||
BinaryDictionary.createEmptyDictFile(file.getAbsolutePath(),
|
BinaryDictionary.createEmptyDictFile(file.getAbsolutePath(),
|
||||||
DICTIONARY_FORMAT_VERSION, getHeaderAttributeMap());
|
DICTIONARY_FORMAT_VERSION, getHeaderAttributeMap());
|
||||||
mBinaryDictionary = new BinaryDictionary(
|
mBinaryDictionary = new BinaryDictionary(
|
||||||
|
@ -481,7 +482,8 @@ abstract public class ExpandableBinaryDictionary extends Dictionary {
|
||||||
+ mFilenameDictionaryUpdateController.mLastUpdateTime);
|
+ mFilenameDictionaryUpdateController.mLastUpdateTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
final File file = new File(mContext.getFilesDir(), mFilename);
|
final File file = new File(mContext.getFilesDir(), mFilename + "/"
|
||||||
|
+ FormatSpec.TRIE_FILE_EXTENSION);
|
||||||
final String filename = file.getAbsolutePath();
|
final String filename = file.getAbsolutePath();
|
||||||
final long length = file.length();
|
final long length = file.length();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue