mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
Merge "Don't call resetDictionaries if DictionaryFacilitatorLruCache.get() hasn't been called yet. This breaks the AOSP SpellChecker. This seems to be a bug introduced recently, when the DictionaryFacilitatorLruCache was turned into a "cache" of 1 element."
This commit is contained in:
commit
a3ac6f24cc
@ -64,11 +64,14 @@ public class DictionaryFacilitatorLruCache {
|
||||
}
|
||||
|
||||
private void resetDictionariesForLocaleLocked() {
|
||||
// Note: Given that personalized dictionaries are not used here; we can pass null account.
|
||||
mDictionaryFacilitator.resetDictionaries(mContext, new Locale[]{mLocale},
|
||||
mUseContactsDictionary, false /* usePersonalizedDicts */,
|
||||
false /* forceReloadMainDictionary */, null /* account */,
|
||||
mDictionaryNamePrefix, null /* listener */);
|
||||
// Nothing to do if the locale is null. This would be the case before any get() calls.
|
||||
if (mLocale != null) {
|
||||
// Note: Given that personalized dictionaries are not used here; we can pass null account.
|
||||
mDictionaryFacilitator.resetDictionaries(mContext, new Locale[]{mLocale},
|
||||
mUseContactsDictionary, false /* usePersonalizedDicts */,
|
||||
false /* forceReloadMainDictionary */, null /* account */,
|
||||
mDictionaryNamePrefix, null /* listener */);
|
||||
}
|
||||
}
|
||||
|
||||
public void setUseContactsDictionary(final boolean useContactsDictionary) {
|
||||
|
Loading…
Reference in New Issue
Block a user