Merge "Remove a useless method, rename another. (A54)"
This commit is contained in:
commit
c84f178cd9
2 changed files with 3 additions and 7 deletions
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue