diff options
author | 2014-02-24 22:17:27 +0900 | |
---|---|---|
committer | 2014-02-24 22:54:01 +0900 | |
commit | 890b44e5376413adc73025e046072bcce3e119c5 (patch) | |
tree | 4baf38d0e2206ef2ee6fbe992e976fea71e74bbb /tools/dicttool/src | |
parent | b08a9e021c2e5be7375295858b28bf8c4b9767b9 (diff) | |
download | latinime-890b44e5376413adc73025e046072bcce3e119c5.tar.gz latinime-890b44e5376413adc73025e046072bcce3e119c5.tar.xz latinime-890b44e5376413adc73025e046072bcce3e119c5.zip |
Correctly read the header of APK-embedded dicts
Bug: 13164518
Change-Id: I8768ad887af8b89ad9f29637f606c3c68629c7ca
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 */); } |