aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src
diff options
context:
space:
mode:
authorAdrian Velicu <adrianv@google.com>2014-10-31 06:49:28 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-10-31 06:49:29 +0000
commitaa20342d7ee40fb13483fc2a663493de185a33cd (patch)
tree53060aec9d2367ebba7fb3339c50e8281243a546 /tests/src
parent0cd1f222fd837179f501651256bc15b42317edd0 (diff)
parent7c87859d4c16c9cf19b095b865d7000ebc3cdaa9 (diff)
downloadlatinime-aa20342d7ee40fb13483fc2a663493de185a33cd.tar.gz
latinime-aa20342d7ee40fb13483fc2a663493de185a33cd.tar.xz
latinime-aa20342d7ee40fb13483fc2a663493de185a33cd.zip
Merge "Using "blacklist" flag as "possibly offensive""
Diffstat (limited to 'tests/src')
-rw-r--r--tests/src/com/android/inputmethod/latin/makedict/Ver2DictDecoder.java3
-rw-r--r--tests/src/com/android/inputmethod/latin/makedict/Ver2DictEncoder.java3
2 files changed, 4 insertions, 2 deletions
diff --git a/tests/src/com/android/inputmethod/latin/makedict/Ver2DictDecoder.java b/tests/src/com/android/inputmethod/latin/makedict/Ver2DictDecoder.java
index 457e7af8e..5c261a94d 100644
--- a/tests/src/com/android/inputmethod/latin/makedict/Ver2DictDecoder.java
+++ b/tests/src/com/android/inputmethod/latin/makedict/Ver2DictDecoder.java
@@ -178,7 +178,8 @@ public class Ver2DictDecoder extends AbstractDictDecoder {
throw new IOException("Cannot read the dictionary header.");
}
if (header.mFormatOptions.mVersion != FormatSpec.VERSION2 &&
- header.mFormatOptions.mVersion != FormatSpec.VERSION201) {
+ header.mFormatOptions.mVersion != FormatSpec.VERSION201 &&
+ header.mFormatOptions.mVersion != FormatSpec.VERSION202) {
throw new UnsupportedFormatException("File header has a wrong version : "
+ header.mFormatOptions.mVersion);
}
diff --git a/tests/src/com/android/inputmethod/latin/makedict/Ver2DictEncoder.java b/tests/src/com/android/inputmethod/latin/makedict/Ver2DictEncoder.java
index 2c2152be7..b52b8c485 100644
--- a/tests/src/com/android/inputmethod/latin/makedict/Ver2DictEncoder.java
+++ b/tests/src/com/android/inputmethod/latin/makedict/Ver2DictEncoder.java
@@ -124,7 +124,8 @@ public class Ver2DictEncoder implements DictEncoder {
@Override
public void writeDictionary(final FusionDictionary dict, final FormatOptions formatOptions)
throws IOException, UnsupportedFormatException {
- if (formatOptions.mVersion > FormatSpec.VERSION201) {
+ // We no longer support anything but the latest version of v2.
+ if (formatOptions.mVersion != FormatSpec.VERSION202) {
throw new UnsupportedFormatException(
"The given format options has wrong version number : "
+ formatOptions.mVersion);