Remove a useless method
Change-Id: I208dd2e725e37c2fb3cd51fe48194679e5912f6b
This commit is contained in:
parent
eda7d8af60
commit
bdf6d1b18b
4 changed files with 13 additions and 29 deletions
|
@ -926,10 +926,10 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
|
|||
final List<SuggestedWords.SuggestedWordInfo> applicationSuggestedWords =
|
||||
SuggestedWords.getFromApplicationSpecifiedCompletions(
|
||||
applicationSpecifiedCompletions);
|
||||
final SuggestedWords suggestedWords = SuggestedWords.getSuggestedWords(
|
||||
final SuggestedWords suggestedWords = new SuggestedWords(
|
||||
applicationSuggestedWords,
|
||||
false /* typedWordValid */,
|
||||
false /* hasMinimalSuggestion */,
|
||||
false /* hasAutoCorrectionCandidate */,
|
||||
false /* allowsToBeAutoCorrected */,
|
||||
false /* isPunctuationSuggestions */,
|
||||
false /* shouldBlockAutoCorrectionBySafetyNet */);
|
||||
|
@ -1790,9 +1790,9 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
|
|||
SuggestedWords.getTypedWordAndPreviousSuggestions(
|
||||
typedWord, previousSuggestions);
|
||||
final SuggestedWords obsoleteSuggestedWords =
|
||||
SuggestedWords.getSuggestedWords(typedWordAndPreviousSuggestions,
|
||||
new SuggestedWords(typedWordAndPreviousSuggestions,
|
||||
false /* typedWordValid */,
|
||||
false /* hasMinimalSuggestion */,
|
||||
false /* hasAutoCorrectionCandidate */,
|
||||
false /* allowsToBeAutoCorrected */,
|
||||
false /* isPunctuationSuggestions */,
|
||||
false /* shouldBlockAutoCorrectionBySafetyNet */);
|
||||
|
|
|
@ -183,9 +183,9 @@ public class SettingsValues {
|
|||
KeySpecParser.getLabel(puncSpec)));
|
||||
}
|
||||
}
|
||||
return SuggestedWords.getSuggestedWords(puncList,
|
||||
return new SuggestedWords(puncList,
|
||||
false /* typedWordValid */,
|
||||
false /* hasMinimalSuggestion */,
|
||||
false /* hasAutoCorrectionCandidate */,
|
||||
false /* allowsToBeAutoCorrected */,
|
||||
true /* isPunctuationSuggestions */,
|
||||
false /* shouldBlockAutoCorrectionBySafetyNet */);
|
||||
|
@ -205,9 +205,9 @@ public class SettingsValues {
|
|||
}
|
||||
}
|
||||
}
|
||||
return SuggestedWords.getSuggestedWords(puncOutputTextList,
|
||||
return new SuggestedWords(puncOutputTextList,
|
||||
false /* typedWordValid */,
|
||||
false /* hasMinimalSuggestion */,
|
||||
false /* hasAutoCorrectionCandidate */,
|
||||
false /* allowsToBeAutoCorrected */,
|
||||
true /* isPunctuationSuggestions */,
|
||||
false /* shouldBlockAutoCorrectionBySafetyNet */);
|
||||
|
|
|
@ -269,10 +269,9 @@ public class Suggest implements Dictionary.WordCallback {
|
|||
|
||||
StringUtils.removeDupes(mSuggestions);
|
||||
|
||||
return SuggestedWords.getSuggestedWords(
|
||||
SuggestedWords.getFromCharSequenceList(mSuggestions),
|
||||
return new SuggestedWords(SuggestedWords.getFromCharSequenceList(mSuggestions),
|
||||
false /* typedWordValid */,
|
||||
false /* hasMinimalSuggestion */,
|
||||
false /* hasAutoCorrectionCandidate */,
|
||||
false /* allowsToBeAutoCorrected */,
|
||||
false /* isPunctuationSuggestions */,
|
||||
false /* shouldBlockAutoCorrectionBySafetyNet */);
|
||||
|
@ -445,9 +444,9 @@ public class Suggest implements Dictionary.WordCallback {
|
|||
} else {
|
||||
shouldBlockAutoCorrectionBySatefyNet = false;
|
||||
}
|
||||
return SuggestedWords.getSuggestedWords(scoreInfoList,
|
||||
return new SuggestedWords(scoreInfoList,
|
||||
!allowsToBeAutoCorrected /* typedWordValid */,
|
||||
autoCorrectionAvailable /* hasMinimalSuggestion */,
|
||||
autoCorrectionAvailable /* hasAutoCorrectionCandidate */,
|
||||
allowsToBeAutoCorrected /* allowsToBeAutoCorrected */,
|
||||
false /* isPunctuationSuggestions */,
|
||||
shouldBlockAutoCorrectionBySatefyNet);
|
||||
|
|
|
@ -33,7 +33,7 @@ public class SuggestedWords {
|
|||
public final boolean mAllowsToBeAutoCorrected;
|
||||
private final List<SuggestedWordInfo> mSuggestedWordInfoList;
|
||||
|
||||
private SuggestedWords(final List<SuggestedWordInfo> suggestedWordInfoList,
|
||||
public SuggestedWords(final List<SuggestedWordInfo> suggestedWordInfoList,
|
||||
final boolean typedWordValid,
|
||||
final boolean hasAutoCorrectionCandidate,
|
||||
final boolean allowsToBeAutoCorrected,
|
||||
|
@ -76,21 +76,6 @@ public class SuggestedWords {
|
|||
+ " 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(
|
||||
final List<CharSequence> wordList) {
|
||||
final ArrayList<SuggestedWordInfo> result = new ArrayList<SuggestedWordInfo>();
|
||||
|
|
Loading…
Reference in a new issue