Merge "Remove a useless method, rename another. (A54)"
commit
c84f178cd9
|
@ -1105,7 +1105,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean addWordToDictionary(String word) {
|
public boolean addWordToUserDictionary(String word) {
|
||||||
mUserDictionary.addWordToUserDictionary(word, 128);
|
mUserDictionary.addWordToUserDictionary(word, 128);
|
||||||
// Suggestion strip should be updated after the operation of adding word to the
|
// Suggestion strip should be updated after the operation of adding word to the
|
||||||
// user dictionary
|
// user dictionary
|
||||||
|
|
|
@ -71,7 +71,7 @@ import java.util.ArrayList;
|
||||||
public class SuggestionsView extends RelativeLayout implements OnClickListener,
|
public class SuggestionsView extends RelativeLayout implements OnClickListener,
|
||||||
OnLongClickListener {
|
OnLongClickListener {
|
||||||
public interface Listener {
|
public interface Listener {
|
||||||
public boolean addWordToDictionary(String word);
|
public boolean addWordToUserDictionary(String word);
|
||||||
public void pickSuggestionManually(int index, CharSequence word, int x, int y);
|
public void pickSuggestionManually(int index, CharSequence word, int x, int y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -718,10 +718,6 @@ public class SuggestionsView extends RelativeLayout implements OnClickListener,
|
||||||
mPreviewPopup.dismiss();
|
mPreviewPopup.dismiss();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addToDictionary(CharSequence word) {
|
|
||||||
mListener.addWordToDictionary(word.toString());
|
|
||||||
}
|
|
||||||
|
|
||||||
private final KeyboardActionListener mMoreSuggestionsListener =
|
private final KeyboardActionListener mMoreSuggestionsListener =
|
||||||
new KeyboardActionListener.Adapter() {
|
new KeyboardActionListener.Adapter() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -863,7 +859,7 @@ public class SuggestionsView extends RelativeLayout implements OnClickListener,
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View view) {
|
public void onClick(View view) {
|
||||||
if (mParams.isAddToDictionaryShowing(view)) {
|
if (mParams.isAddToDictionaryShowing(view)) {
|
||||||
addToDictionary(mParams.getAddToDictionaryWord());
|
mListener.addWordToUserDictionary(mParams.getAddToDictionaryWord().toString());
|
||||||
clear();
|
clear();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue