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

Commit ea51bfd8 authored by Tadashi G. Takaoka's avatar Tadashi G. Takaoka
Browse files

Fix SuggestedWords.toString

Change-Id: Ide3f605ce40e8c230f217bbf37ab016457ee91f1
parent 02e70cf9
Loading
Loading
Loading
Loading
+14 −1
Original line number Diff line number Diff line
@@ -16,9 +16,11 @@

package com.android.inputmethod.latin;

import android.text.TextUtils;
import android.view.inputmethod.CompletionInfo;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
@@ -71,7 +73,9 @@ public class SuggestedWords {
        return "SuggestedWords:"
                + " mTypedWordValid=" + mTypedWordValid
                + " mHasAutoCorrectionCandidate=" + mHasAutoCorrectionCandidate
                + " mIsPunctuationSuggestions=" + mIsPunctuationSuggestions;
                + " mAllowsToBeAutoCorrected=" + mAllowsToBeAutoCorrected
                + " mIsPunctuationSuggestions=" + mIsPunctuationSuggestions
                + " words=" + Arrays.toString(mSuggestedWordInfoList.toArray());
    }

    public static ArrayList<SuggestedWordInfo> getFromCharSequenceList(
@@ -141,5 +145,14 @@ public class SuggestedWords {
        public boolean isObsoleteSuggestedWord () {
            return mPreviousSuggestedWord;
        }

        @Override
        public String toString() {
            if (TextUtils.isEmpty(mDebugString)) {
                return mWord.toString();
            } else {
                return mWord.toString() + " (" + mDebugString.toString() + ")";
            }
        }
    }
}