Fix: Reporting wrong main dictionary availability.
Bug: 13965806 Change-Id: Ida2234ab8cb7785ec5efd433a58949bf21c44351main
parent
ce76821dce
commit
de4d401038
|
@ -217,9 +217,6 @@ public class DictionaryFacilitatorForSuggest {
|
|||
// Replace Dictionaries.
|
||||
final Dictionaries newDictionaries = new Dictionaries(newLocale, newMainDict,
|
||||
newContactsDict, newUserDictionary, newUserHistoryDict, newPersonalizationDict);
|
||||
if (listener != null) {
|
||||
listener.onUpdateMainDictionaryAvailability(newDictionaries.hasMainDict());
|
||||
}
|
||||
final Dictionaries oldDictionaries;
|
||||
synchronized (mLock) {
|
||||
oldDictionaries = mDictionaries;
|
||||
|
@ -228,6 +225,9 @@ public class DictionaryFacilitatorForSuggest {
|
|||
asyncReloadMainDictionary(context, newLocale, listener);
|
||||
}
|
||||
}
|
||||
if (listener != null) {
|
||||
listener.onUpdateMainDictionaryAvailability(hasInitializedMainDictionary());
|
||||
}
|
||||
|
||||
// Clean up old dictionaries.
|
||||
oldDictionaries.mDictMap.clear();
|
||||
|
@ -266,7 +266,7 @@ public class DictionaryFacilitatorForSuggest {
|
|||
}
|
||||
}
|
||||
if (listener != null) {
|
||||
listener.onUpdateMainDictionaryAvailability(mDictionaries.hasMainDict());
|
||||
listener.onUpdateMainDictionaryAvailability(hasInitializedMainDictionary());
|
||||
}
|
||||
latchForWaitingLoadingMainDictionary.countDown();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue