Move dict version check to proper place.
Change-Id: I89a5b4fa93153081b4f7a9183619cbe7c9ea01famain
parent
20770f4ba0
commit
c3b151957c
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue