Merge "Move dict version check to proper place."
This commit is contained in:
commit
ac37d4d9e3
1 changed files with 9 additions and 9 deletions
|
@ -528,17 +528,17 @@ abstract public class ExpandableBinaryDictionary extends Dictionary {
|
||||||
} else if (mBinaryDictionary == null) {
|
} else if (mBinaryDictionary == null) {
|
||||||
// Otherwise, load the existing dictionary.
|
// Otherwise, load the existing dictionary.
|
||||||
loadBinaryDictionaryLocked();
|
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;
|
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 {
|
} finally {
|
||||||
mIsReloading.set(false);
|
mIsReloading.set(false);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue