aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java')
-rw-r--r--java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java b/java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java
index b79b99edc..cda429e6a 100644
--- a/java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java
+++ b/java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java
@@ -516,12 +516,12 @@ abstract public class ExpandableBinaryDictionary extends Dictionary {
*/
private final void asyncReloadDictionary() {
if (mIsReloading.compareAndSet(false, true)) {
- mNeedsToReload = false;
asyncExecuteTaskWithWriteLock(new Runnable() {
@Override
public void run() {
try {
- if (!mDictFile.exists() || haveContentsChanged()) {
+ // TODO: Quit checking contents in ExpandableBinaryDictionary.
+ if (!mDictFile.exists() || (mNeedsToReload && haveContentsChanged())) {
// If the dictionary file does not exist or contents have been updated,
// generate a new one.
createNewDictionaryLocked();
@@ -529,6 +529,7 @@ abstract public class ExpandableBinaryDictionary extends Dictionary {
// Otherwise, load the existing dictionary.
loadBinaryDictionaryLocked();
}
+ mNeedsToReload = false;
if (mBinaryDictionary != null && !(isValidDictionaryLocked()
// TODO: remove the check below
&& matchesExpectedBinaryDictFormatVersionForThisType(