diff options
author | 2014-02-24 13:57:46 +0000 | |
---|---|---|
committer | 2014-02-24 13:57:46 +0000 | |
commit | 6e224a236a0a7cd253f74c7ed8b9a8f2eea41600 (patch) | |
tree | 9214094f6008e98fcca15af9453ca4f232ad55b8 /tools/dicttool/src | |
parent | 64ace089a8cde06ff030aa491b798ec7d32a3ad7 (diff) | |
parent | 890b44e5376413adc73025e046072bcce3e119c5 (diff) | |
download | latinime-6e224a236a0a7cd253f74c7ed8b9a8f2eea41600.tar.gz latinime-6e224a236a0a7cd253f74c7ed8b9a8f2eea41600.tar.xz latinime-6e224a236a0a7cd253f74c7ed8b9a8f2eea41600.zip |
Merge "Correctly read the header of APK-embedded dicts"
Diffstat (limited to 'tools/dicttool/src')
-rw-r--r-- | tools/dicttool/src/com/android/inputmethod/latin/dicttool/BinaryDictOffdeviceUtils.java | 2 | ||||
-rw-r--r-- | tools/dicttool/src/com/android/inputmethod/latin/dicttool/DictionaryMaker.java | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/tools/dicttool/src/com/android/inputmethod/latin/dicttool/BinaryDictOffdeviceUtils.java b/tools/dicttool/src/com/android/inputmethod/latin/dicttool/BinaryDictOffdeviceUtils.java index d1df81b52..e31ac2ab6 100644 --- a/tools/dicttool/src/com/android/inputmethod/latin/dicttool/BinaryDictOffdeviceUtils.java +++ b/tools/dicttool/src/com/android/inputmethod/latin/dicttool/BinaryDictOffdeviceUtils.java @@ -192,7 +192,7 @@ public final class BinaryDictOffdeviceUtils { new BufferedInputStream(new FileInputStream(decodedSpec.mFile))); } else { final DictDecoder dictDecoder = FormatSpec.getDictDecoder(decodedSpec.mFile, - DictDecoder.USE_BYTEARRAY); + 0, decodedSpec.mFile.length(), DictDecoder.USE_BYTEARRAY); if (report) { System.out.println("Format : Binary dictionary format"); System.out.println("Packaging : " + decodedSpec.describeChain()); diff --git a/tools/dicttool/src/com/android/inputmethod/latin/dicttool/DictionaryMaker.java b/tools/dicttool/src/com/android/inputmethod/latin/dicttool/DictionaryMaker.java index 80d71fc64..68d785044 100644 --- a/tools/dicttool/src/com/android/inputmethod/latin/dicttool/DictionaryMaker.java +++ b/tools/dicttool/src/com/android/inputmethod/latin/dicttool/DictionaryMaker.java @@ -264,7 +264,7 @@ public class DictionaryMaker { private static FusionDictionary readBinaryFile(final String binaryFilename) throws FileNotFoundException, IOException, UnsupportedFormatException { final File file = new File(binaryFilename); - final DictDecoder dictDecoder = FormatSpec.getDictDecoder(file); + final DictDecoder dictDecoder = FormatSpec.getDictDecoder(file, 0, file.length()); return dictDecoder.readDictionaryBinary(false /* deleteDictIfBroken */); } |