am ac37d4d9: Merge "Move dict version check to proper place."

* commit 'ac37d4d9e381c8fa5262e529594d6b898a8a2e5f':
  Move dict version check to proper place.
main
Keisuke Kuroyanagi 2014-05-01 09:21:57 +00:00 committed by Android Git Automerger
commit f134aa78b7
1 changed files with 9 additions and 9 deletions

View File

@ -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);
}