Remove a useless method

Change-Id: I208dd2e725e37c2fb3cd51fe48194679e5912f6b
This commit is contained in:
Jean Chalard 2012-03-14 15:59:04 +09:00
parent eda7d8af60
commit bdf6d1b18b
4 changed files with 13 additions and 29 deletions

View file

@ -926,10 +926,10 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
final List<SuggestedWords.SuggestedWordInfo> applicationSuggestedWords = final List<SuggestedWords.SuggestedWordInfo> applicationSuggestedWords =
SuggestedWords.getFromApplicationSpecifiedCompletions( SuggestedWords.getFromApplicationSpecifiedCompletions(
applicationSpecifiedCompletions); applicationSpecifiedCompletions);
final SuggestedWords suggestedWords = SuggestedWords.getSuggestedWords( final SuggestedWords suggestedWords = new SuggestedWords(
applicationSuggestedWords, applicationSuggestedWords,
false /* typedWordValid */, false /* typedWordValid */,
false /* hasMinimalSuggestion */, false /* hasAutoCorrectionCandidate */,
false /* allowsToBeAutoCorrected */, false /* allowsToBeAutoCorrected */,
false /* isPunctuationSuggestions */, false /* isPunctuationSuggestions */,
false /* shouldBlockAutoCorrectionBySafetyNet */); false /* shouldBlockAutoCorrectionBySafetyNet */);
@ -1790,9 +1790,9 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
SuggestedWords.getTypedWordAndPreviousSuggestions( SuggestedWords.getTypedWordAndPreviousSuggestions(
typedWord, previousSuggestions); typedWord, previousSuggestions);
final SuggestedWords obsoleteSuggestedWords = final SuggestedWords obsoleteSuggestedWords =
SuggestedWords.getSuggestedWords(typedWordAndPreviousSuggestions, new SuggestedWords(typedWordAndPreviousSuggestions,
false /* typedWordValid */, false /* typedWordValid */,
false /* hasMinimalSuggestion */, false /* hasAutoCorrectionCandidate */,
false /* allowsToBeAutoCorrected */, false /* allowsToBeAutoCorrected */,
false /* isPunctuationSuggestions */, false /* isPunctuationSuggestions */,
false /* shouldBlockAutoCorrectionBySafetyNet */); false /* shouldBlockAutoCorrectionBySafetyNet */);

View file

@ -183,9 +183,9 @@ public class SettingsValues {
KeySpecParser.getLabel(puncSpec))); KeySpecParser.getLabel(puncSpec)));
} }
} }
return SuggestedWords.getSuggestedWords(puncList, return new SuggestedWords(puncList,
false /* typedWordValid */, false /* typedWordValid */,
false /* hasMinimalSuggestion */, false /* hasAutoCorrectionCandidate */,
false /* allowsToBeAutoCorrected */, false /* allowsToBeAutoCorrected */,
true /* isPunctuationSuggestions */, true /* isPunctuationSuggestions */,
false /* shouldBlockAutoCorrectionBySafetyNet */); false /* shouldBlockAutoCorrectionBySafetyNet */);
@ -205,9 +205,9 @@ public class SettingsValues {
} }
} }
} }
return SuggestedWords.getSuggestedWords(puncOutputTextList, return new SuggestedWords(puncOutputTextList,
false /* typedWordValid */, false /* typedWordValid */,
false /* hasMinimalSuggestion */, false /* hasAutoCorrectionCandidate */,
false /* allowsToBeAutoCorrected */, false /* allowsToBeAutoCorrected */,
true /* isPunctuationSuggestions */, true /* isPunctuationSuggestions */,
false /* shouldBlockAutoCorrectionBySafetyNet */); false /* shouldBlockAutoCorrectionBySafetyNet */);

View file

@ -269,10 +269,9 @@ public class Suggest implements Dictionary.WordCallback {
StringUtils.removeDupes(mSuggestions); StringUtils.removeDupes(mSuggestions);
return SuggestedWords.getSuggestedWords( return new SuggestedWords(SuggestedWords.getFromCharSequenceList(mSuggestions),
SuggestedWords.getFromCharSequenceList(mSuggestions),
false /* typedWordValid */, false /* typedWordValid */,
false /* hasMinimalSuggestion */, false /* hasAutoCorrectionCandidate */,
false /* allowsToBeAutoCorrected */, false /* allowsToBeAutoCorrected */,
false /* isPunctuationSuggestions */, false /* isPunctuationSuggestions */,
false /* shouldBlockAutoCorrectionBySafetyNet */); false /* shouldBlockAutoCorrectionBySafetyNet */);
@ -445,9 +444,9 @@ public class Suggest implements Dictionary.WordCallback {
} else { } else {
shouldBlockAutoCorrectionBySatefyNet = false; shouldBlockAutoCorrectionBySatefyNet = false;
} }
return SuggestedWords.getSuggestedWords(scoreInfoList, return new SuggestedWords(scoreInfoList,
!allowsToBeAutoCorrected /* typedWordValid */, !allowsToBeAutoCorrected /* typedWordValid */,
autoCorrectionAvailable /* hasMinimalSuggestion */, autoCorrectionAvailable /* hasAutoCorrectionCandidate */,
allowsToBeAutoCorrected /* allowsToBeAutoCorrected */, allowsToBeAutoCorrected /* allowsToBeAutoCorrected */,
false /* isPunctuationSuggestions */, false /* isPunctuationSuggestions */,
shouldBlockAutoCorrectionBySatefyNet); shouldBlockAutoCorrectionBySatefyNet);

View file

@ -33,7 +33,7 @@ public class SuggestedWords {
public final boolean mAllowsToBeAutoCorrected; public final boolean mAllowsToBeAutoCorrected;
private final List<SuggestedWordInfo> mSuggestedWordInfoList; private final List<SuggestedWordInfo> mSuggestedWordInfoList;
private SuggestedWords(final List<SuggestedWordInfo> suggestedWordInfoList, public SuggestedWords(final List<SuggestedWordInfo> suggestedWordInfoList,
final boolean typedWordValid, final boolean typedWordValid,
final boolean hasAutoCorrectionCandidate, final boolean hasAutoCorrectionCandidate,
final boolean allowsToBeAutoCorrected, final boolean allowsToBeAutoCorrected,
@ -76,21 +76,6 @@ public class SuggestedWords {
+ " mIsPunctuationSuggestions=" + mIsPunctuationSuggestions; + " mIsPunctuationSuggestions=" + mIsPunctuationSuggestions;
} }
public static SuggestedWords getSuggestedWords(
final List<SuggestedWordInfo> suggestedWordInfoList,
final boolean typedWordValid,
final boolean hasMinimalSuggestion,
final boolean allowsToBeAutoCorrected,
final boolean isPunctuationSuggestions,
final boolean shouldBlockAutoCorrectionBySafetyNet) {
return new SuggestedWords(suggestedWordInfoList,
typedWordValid,
hasMinimalSuggestion,
allowsToBeAutoCorrected,
isPunctuationSuggestions,
shouldBlockAutoCorrectionBySafetyNet);
}
public static ArrayList<SuggestedWordInfo> getFromCharSequenceList( public static ArrayList<SuggestedWordInfo> getFromCharSequenceList(
final List<CharSequence> wordList) { final List<CharSequence> wordList) {
final ArrayList<SuggestedWordInfo> result = new ArrayList<SuggestedWordInfo>(); final ArrayList<SuggestedWordInfo> result = new ArrayList<SuggestedWordInfo>();