aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/com/android/inputmethod/latin/makedict/Ver2DictEncoder.java
diff options
context:
space:
mode:
authorAkifumi Yoshimoto <akifumi@google.com>2014-09-25 16:54:12 +0900
committerAkifumi Yoshimoto <akifumi@google.com>2014-10-02 12:28:04 +0900
commitf51d3667fcaaaebec28ca5376e0027d0ee4c79de (patch)
tree8b5c2c301e232b57633c7bce3ff5dd8d1f7910b9 /tests/src/com/android/inputmethod/latin/makedict/Ver2DictEncoder.java
parent25c884ba655edd5cfce42d31df994baba039479f (diff)
downloadlatinime-f51d3667fcaaaebec28ca5376e0027d0ee4c79de.tar.gz
latinime-f51d3667fcaaaebec28ca5376e0027d0ee4c79de.tar.xz
latinime-f51d3667fcaaaebec28ca5376e0027d0ee4c79de.zip
Switch code point table
Bug:17097992 Change-Id: I3c1f5ac183ebb5d3757b8ff258655869ab61f2e7
Diffstat (limited to 'tests/src/com/android/inputmethod/latin/makedict/Ver2DictEncoder.java')
-rw-r--r--tests/src/com/android/inputmethod/latin/makedict/Ver2DictEncoder.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/src/com/android/inputmethod/latin/makedict/Ver2DictEncoder.java b/tests/src/com/android/inputmethod/latin/makedict/Ver2DictEncoder.java
index eabde4620..2c2152be7 100644
--- a/tests/src/com/android/inputmethod/latin/makedict/Ver2DictEncoder.java
+++ b/tests/src/com/android/inputmethod/latin/makedict/Ver2DictEncoder.java
@@ -137,10 +137,11 @@ public class Ver2DictEncoder implements DictEncoder {
// Make code point conversion table ordered by occurrence of code points
// Version 201 or later have codePointTable
final CodePointTable codePointTable;
- if (formatOptions.mVersion >= FormatSpec.MINIMUM_SUPPORTED_VERSION_OF_CODE_POINT_TABLE) {
- codePointTable = makeCodePointTable(dict);
- } else {
+ if (mCodePointTableMode == CODE_POINT_TABLE_OFF || formatOptions.mVersion
+ < FormatSpec.MINIMUM_SUPPORTED_VERSION_OF_CODE_POINT_TABLE) {
codePointTable = new CodePointTable();
+ } else {
+ codePointTable = makeCodePointTable(dict);
}
BinaryDictEncoderUtils.writeDictionaryHeader(mOutStream, dict, formatOptions,