Remove a useless method, rename another. (A54)

Change-Id: If36b5375b04f68deeb72bcece3cb8d37aed57f59
This commit is contained in:
Jean Chalard 2012-07-05 11:28:05 +09:00
parent 0783366036
commit 3d8e7a62fc
2 changed files with 3 additions and 7 deletions

View file

@ -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

View file

@ -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;
}