Fix: NPE in LatinIME.loadSettnigs().

Change-Id: Icae6c74401a7a8f4da6015737f09f557640c0cca
This commit is contained in:
Keisuke Kuroyanagi 2014-01-08 12:43:58 +09:00
parent 385031557b
commit b3c51630a6

View file

@ -524,8 +524,10 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
}
if (currentSettingsValues.mUsePersonalizedDicts) {
if (mSubtypeSwitcher.isSystemLocaleSameAsLocaleOfAllEnabledSubtypes()) {
PersonalizationDictionarySessionRegistrar.init(this,
mInputLogic.mSuggest.mDictionaryFacilitator);
final DictionaryFacilitatorForSuggest dictionaryFacilitator =
(mInputLogic.mSuggest == null) ?
null : mInputLogic.mSuggest.mDictionaryFacilitator;
PersonalizationDictionarySessionRegistrar.init(this, dictionaryFacilitator);
} else {
PersonalizationDictionarySessionRegistrar.close(this);
}