diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index 594529500..1f6092c50 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -1105,7 +1105,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen } @Override - public boolean addWordToDictionary(String word) { + public boolean addWordToUserDictionary(String word) { mUserDictionary.addWordToUserDictionary(word, 128); // Suggestion strip should be updated after the operation of adding word to the // user dictionary diff --git a/java/src/com/android/inputmethod/latin/suggestions/SuggestionsView.java b/java/src/com/android/inputmethod/latin/suggestions/SuggestionsView.java index 642a551ce..4d33f4ba5 100644 --- a/java/src/com/android/inputmethod/latin/suggestions/SuggestionsView.java +++ b/java/src/com/android/inputmethod/latin/suggestions/SuggestionsView.java @@ -71,7 +71,7 @@ import java.util.ArrayList; public class SuggestionsView extends RelativeLayout implements OnClickListener, OnLongClickListener { public interface Listener { - public boolean addWordToDictionary(String word); + public boolean addWordToUserDictionary(String word); public void pickSuggestionManually(int index, CharSequence word, int x, int y); } @@ -718,10 +718,6 @@ public class SuggestionsView extends RelativeLayout implements OnClickListener, mPreviewPopup.dismiss(); } - private void addToDictionary(CharSequence word) { - mListener.addWordToDictionary(word.toString()); - } - private final KeyboardActionListener mMoreSuggestionsListener = new KeyboardActionListener.Adapter() { @Override @@ -863,7 +859,7 @@ public class SuggestionsView extends RelativeLayout implements OnClickListener, @Override public void onClick(View view) { if (mParams.isAddToDictionaryShowing(view)) { - addToDictionary(mParams.getAddToDictionaryWord()); + mListener.addWordToUserDictionary(mParams.getAddToDictionaryWord().toString()); clear(); return; }