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

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

Merge "Avoid returning an object that's still used internally"

parents b568a627 5c08151c
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -306,12 +306,10 @@ public class Suggest implements Dictionary.WordCallback {
        Arrays.fill(mScores, 0);

        // Save a lowercase version of the original word
        CharSequence typedWord = wordComposer.getTypedWord();
        String typedWord = wordComposer.getTypedWord();
        if (typedWord != null) {
            final String typedWordString = typedWord.toString();
            typedWord = typedWordString;
            // Treating USER_TYPED as UNIGRAM suggestion for logging now.
            LatinImeLogger.onAddSuggestedWord(typedWordString, Suggest.DIC_USER_TYPED,
            LatinImeLogger.onAddSuggestedWord(typedWord, Suggest.DIC_USER_TYPED,
                    Dictionary.DataType.UNIGRAM);
        }
        mTypedWord = typedWord;
+2 −2
Original line number Diff line number Diff line
@@ -164,11 +164,11 @@ public class WordComposer {
     * Returns the word as it was typed, without any correction applied.
     * @return the word that was typed so far
     */
    public CharSequence getTypedWord() {
    public String getTypedWord() {
        if (size() == 0) {
            return null;
        }
        return mTypedWord;
        return mTypedWord.toString();
    }

    /**