Prepare using dictionaryFacilitator for amanatto updates.
Bug: 11736529 Change-Id: I0d9d9b1c1108b11064163df7c2089f53e92cd7ad
This commit is contained in:
parent
55713e3695
commit
c09fd175c3
2 changed files with 12 additions and 4 deletions
|
@ -524,7 +524,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
|||
}
|
||||
if (currentSettingsValues.mUsePersonalizedDicts) {
|
||||
if (mSubtypeSwitcher.isSystemLocaleSameAsLocaleOfAllEnabledSubtypes()) {
|
||||
PersonalizationDictionarySessionRegistrar.init(this);
|
||||
PersonalizationDictionarySessionRegistrar.init(this,
|
||||
mInputLogic.mSuggest.mDictionaryFacilitator);
|
||||
} else {
|
||||
PersonalizationDictionarySessionRegistrar.close(this);
|
||||
}
|
||||
|
@ -568,6 +569,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
|||
new DictionaryFacilitatorForSuggest(this /* context */, subtypeLocale,
|
||||
settingsValues, this /* DictionaryInitializationListener */,
|
||||
oldDictionaryFacilitator);
|
||||
PersonalizationDictionarySessionRegistrar.onConfigurationChanged(
|
||||
this, getResources().getConfiguration(), dictionaryFacilitator);
|
||||
final Suggest newSuggest = new Suggest(subtypeLocale, dictionaryFacilitator);
|
||||
if (settingsValues.mCorrectionEnabled) {
|
||||
newSuggest.setAutoCorrectionThreshold(settingsValues.mAutoCorrectionThreshold);
|
||||
|
@ -619,7 +622,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
|||
mOptionsDialog.dismiss();
|
||||
}
|
||||
}
|
||||
PersonalizationDictionarySessionRegistrar.onConfigurationChanged(this, conf);
|
||||
PersonalizationDictionarySessionRegistrar.onConfigurationChanged(this, conf,
|
||||
mInputLogic.mSuggest.mDictionaryFacilitator);
|
||||
super.onConfigurationChanged(conf);
|
||||
}
|
||||
|
||||
|
|
|
@ -19,11 +19,15 @@ package com.android.inputmethod.latin.personalization;
|
|||
import android.content.Context;
|
||||
import android.content.res.Configuration;
|
||||
|
||||
import com.android.inputmethod.latin.DictionaryFacilitatorForSuggest;
|
||||
|
||||
public class PersonalizationDictionarySessionRegistrar {
|
||||
public static void init(final Context context) {
|
||||
public static void init(final Context context,
|
||||
final DictionaryFacilitatorForSuggest dictionaryFacilitator) {
|
||||
}
|
||||
|
||||
public static void onConfigurationChanged(final Context context, final Configuration conf) {
|
||||
public static void onConfigurationChanged(final Context context, final Configuration conf,
|
||||
final DictionaryFacilitatorForSuggest dictionaryFacilitator) {
|
||||
}
|
||||
|
||||
public static void onUpdateData(final Context context, final String type) {
|
||||
|
|
Loading…
Reference in a new issue