am f86b8309: Merge "Prepare using dictionaryFacilitator for amanatto updates."
* commit 'f86b8309869b6bde9aff6a73510e415cbceb9d6e': Prepare using dictionaryFacilitator for amanatto updates.main
commit
f61b53c7f2
|
@ -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 New Issue