Merge "Fix SuggestedWords.toString"
commit
b8c471af47
|
@ -16,9 +16,11 @@
|
||||||
|
|
||||||
package com.android.inputmethod.latin;
|
package com.android.inputmethod.latin;
|
||||||
|
|
||||||
|
import android.text.TextUtils;
|
||||||
import android.view.inputmethod.CompletionInfo;
|
import android.view.inputmethod.CompletionInfo;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -71,7 +73,9 @@ public class SuggestedWords {
|
||||||
return "SuggestedWords:"
|
return "SuggestedWords:"
|
||||||
+ " mTypedWordValid=" + mTypedWordValid
|
+ " mTypedWordValid=" + mTypedWordValid
|
||||||
+ " mHasAutoCorrectionCandidate=" + mHasAutoCorrectionCandidate
|
+ " mHasAutoCorrectionCandidate=" + mHasAutoCorrectionCandidate
|
||||||
+ " mIsPunctuationSuggestions=" + mIsPunctuationSuggestions;
|
+ " mAllowsToBeAutoCorrected=" + mAllowsToBeAutoCorrected
|
||||||
|
+ " mIsPunctuationSuggestions=" + mIsPunctuationSuggestions
|
||||||
|
+ " words=" + Arrays.toString(mSuggestedWordInfoList.toArray());
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ArrayList<SuggestedWordInfo> getFromCharSequenceList(
|
public static ArrayList<SuggestedWordInfo> getFromCharSequenceList(
|
||||||
|
@ -141,5 +145,14 @@ public class SuggestedWords {
|
||||||
public boolean isObsoleteSuggestedWord () {
|
public boolean isObsoleteSuggestedWord () {
|
||||||
return mPreviousSuggestedWord;
|
return mPreviousSuggestedWord;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
if (TextUtils.isEmpty(mDebugString)) {
|
||||||
|
return mWord.toString();
|
||||||
|
} else {
|
||||||
|
return mWord.toString() + " (" + mDebugString.toString() + ")";
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue