Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c84f178c authored by Jean Chalard's avatar Jean Chalard Committed by Android (Google) Code Review
Browse files

Merge "Remove a useless method, rename another. (A54)"

parents 92d2f7e0 3d8e7a62
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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
+2 −6
Original line number Diff line number Diff line
@@ -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;
        }