aboutsummaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
authorKeisuke Kuroyanagi <ksk@google.com>2014-05-01 09:18:58 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-05-01 09:18:58 +0000
commitac37d4d9e381c8fa5262e529594d6b898a8a2e5f (patch)
treeeff60a96402dad74f68dd68e86d0e6c47b4a6764 /java
parentd6d2a41be9a612e21a2051b7c6ecd929f3a0660a (diff)
parentc3b151957cd2130cbf781fd815a7f7322308f542 (diff)
downloadlatinime-ac37d4d9e381c8fa5262e529594d6b898a8a2e5f.tar.gz
latinime-ac37d4d9e381c8fa5262e529594d6b898a8a2e5f.tar.xz
latinime-ac37d4d9e381c8fa5262e529594d6b898a8a2e5f.zip
Merge "Move dict version check to proper place."
Diffstat (limited to 'java')
-rw-r--r--java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java18
1 files changed, 9 insertions, 9 deletions
diff --git a/java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java b/java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java
index cda429e6a..c825ca462 100644
--- a/java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java
+++ b/java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java
@@ -528,17 +528,17 @@ abstract public class ExpandableBinaryDictionary extends Dictionary {
} else if (mBinaryDictionary == null) {
// Otherwise, load the existing dictionary.
loadBinaryDictionaryLocked();
+ if (mBinaryDictionary != null && !(isValidDictionaryLocked()
+ // TODO: remove the check below
+ && matchesExpectedBinaryDictFormatVersionForThisType(
+ mBinaryDictionary.getFormatVersion()))) {
+ // Binary dictionary or its format version is not valid. Regenerate
+ // the dictionary file. writeBinaryDictionary will remove the
+ // existing files if appropriate.
+ createNewDictionaryLocked();
+ }
}
mNeedsToReload = false;
- if (mBinaryDictionary != null && !(isValidDictionaryLocked()
- // TODO: remove the check below
- && matchesExpectedBinaryDictFormatVersionForThisType(
- mBinaryDictionary.getFormatVersion()))) {
- // Binary dictionary or its format version is not valid. Regenerate
- // the dictionary file. writeBinaryDictionary will remove the
- // existing files if appropriate.
- createNewDictionaryLocked();
- }
} finally {
mIsReloading.set(false);
}