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