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