am 37c49f63: Update suggestion strip when the contextual dict is updated.

* commit '37c49f63dfe5cd2385d808cd113a3b46603fc5d4':
  Update suggestion strip when the contextual dict is updated.
This commit is contained in:
Keisuke Kuroyanagi 2014-06-16 09:50:30 +00:00 committed by Android Git Automerger
commit e8eb3c245a
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 = private final PersonalizationDictionaryUpdater mPersonalizationDictionaryUpdater =
new PersonalizationDictionaryUpdater(this /* context */, mDictionaryFacilitator); new PersonalizationDictionaryUpdater(this /* context */, mDictionaryFacilitator);
private final ContextualDictionaryUpdater mContextualDictionaryUpdater = 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 */, private final InputLogic mInputLogic = new InputLogic(this /* LatinIME */,
this /* SuggestionStripViewAccessor */, mDictionaryFacilitator); this /* SuggestionStripViewAccessor */, mDictionaryFacilitator);
// We expect to have only one decoder in almost all cases, hence the default capacity of 1. // 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 class ContextualDictionaryUpdater {
public ContextualDictionaryUpdater(final Context context, public ContextualDictionaryUpdater(final Context context,
final DictionaryFacilitator dictionaryFacilitator) { final DictionaryFacilitator dictionaryFacilitator,
final Runnable onUpdateRunnable) {
} }
public void onLoadSettings(final boolean usePersonalizedDicts) { public void onLoadSettings(final boolean usePersonalizedDicts) {