aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorKeisuke Kuroyanagi <ksk@google.com>2014-05-01 09:21:57 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-05-01 09:21:57 +0000
commitf134aa78b71494a2998ebfbcb54554d159aed21c (patch)
treeeff60a96402dad74f68dd68e86d0e6c47b4a6764 /java/src
parente0431125315e2e002134c7280cf7c1abfb193247 (diff)
parentac37d4d9e381c8fa5262e529594d6b898a8a2e5f (diff)
downloadlatinime-f134aa78b71494a2998ebfbcb54554d159aed21c.tar.gz
latinime-f134aa78b71494a2998ebfbcb54554d159aed21c.tar.xz
latinime-f134aa78b71494a2998ebfbcb54554d159aed21c.zip
am ac37d4d9: Merge "Move dict version check to proper place."
* commit 'ac37d4d9e381c8fa5262e529594d6b898a8a2e5f': Move dict version check to proper place.
Diffstat (limited to 'java/src')
-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);
}