Update suggestion strip when the contextual dict is updated.

Bug: 14161647
Change-Id: Ic7d53464bd051bffc8c7f8d097325321fe0aaee7
This commit is contained in:
Keisuke Kuroyanagi 2014-06-16 18:30:59 +09:00
parent cb368a6dac
commit 37c49f63df
2 changed files with 9 additions and 2 deletions

View file

@ -127,7 +127,13 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
private final PersonalizationDictionaryUpdater mPersonalizationDictionaryUpdater =
new PersonalizationDictionaryUpdater(this /* context */, mDictionaryFacilitator);
private final ContextualDictionaryUpdater mContextualDictionaryUpdater =
new ContextualDictionaryUpdater(this /* context */, mDictionaryFacilitator);
new ContextualDictionaryUpdater(this /* context */, mDictionaryFacilitator,
new Runnable() {
@Override
public void run() {
mHandler.postUpdateSuggestionStrip();
}
});
private final InputLogic mInputLogic = new InputLogic(this /* LatinIME */,
this /* SuggestionStripViewAccessor */, mDictionaryFacilitator);
// We expect to have only one decoder in almost all cases, hence the default capacity of 1.

View file

@ -22,7 +22,8 @@ import com.android.inputmethod.latin.DictionaryFacilitator;
public class ContextualDictionaryUpdater {
public ContextualDictionaryUpdater(final Context context,
final DictionaryFacilitator dictionaryFacilitator) {
final DictionaryFacilitator dictionaryFacilitator,
final Runnable onUpdateRunnable) {
}
public void onLoadSettings(final boolean usePersonalizedDicts) {