Match the constructor of SuggestedWords to the Builder call.
We have to match one way or another, and the argument order to the Builder call is more logical. Change-Id: Iac7c3a351c2687cb294d6a4924fd9cb20ca95177main
parent
7d55c891af
commit
33cc825374
|
@ -24,8 +24,8 @@ import java.util.HashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class SuggestedWords {
|
public class SuggestedWords {
|
||||||
public static final SuggestedWords EMPTY = new SuggestedWords(false, false, false, false,
|
public static final SuggestedWords EMPTY = new SuggestedWords(
|
||||||
false, Collections.<SuggestedWordInfo>emptyList());
|
Collections.<SuggestedWordInfo>emptyList(), false, false, false, false, false);
|
||||||
|
|
||||||
public final boolean mTypedWordValid;
|
public final boolean mTypedWordValid;
|
||||||
public final boolean mHasAutoCorrectionCandidate;
|
public final boolean mHasAutoCorrectionCandidate;
|
||||||
|
@ -33,18 +33,18 @@ public class SuggestedWords {
|
||||||
public final boolean mAllowsToBeAutoCorrected;
|
public final boolean mAllowsToBeAutoCorrected;
|
||||||
private final List<SuggestedWordInfo> mSuggestedWordInfoList;
|
private final List<SuggestedWordInfo> mSuggestedWordInfoList;
|
||||||
|
|
||||||
private SuggestedWords(final boolean typedWordValid,
|
private SuggestedWords(final List<SuggestedWordInfo> suggestedWordInfoList,
|
||||||
|
final boolean typedWordValid,
|
||||||
final boolean hasAutoCorrectionCandidate,
|
final boolean hasAutoCorrectionCandidate,
|
||||||
final boolean isPunctuationSuggestions,
|
|
||||||
final boolean shouldBlockAutoCorrectionBySafetyNet,
|
|
||||||
final boolean allowsToBeAutoCorrected,
|
final boolean allowsToBeAutoCorrected,
|
||||||
final List<SuggestedWordInfo> suggestedWordInfoList) {
|
final boolean isPunctuationSuggestions,
|
||||||
|
final boolean shouldBlockAutoCorrectionBySafetyNet) {
|
||||||
|
mSuggestedWordInfoList = suggestedWordInfoList;
|
||||||
mTypedWordValid = typedWordValid;
|
mTypedWordValid = typedWordValid;
|
||||||
mHasAutoCorrectionCandidate = hasAutoCorrectionCandidate
|
mHasAutoCorrectionCandidate = hasAutoCorrectionCandidate
|
||||||
&& !shouldBlockAutoCorrectionBySafetyNet;
|
&& !shouldBlockAutoCorrectionBySafetyNet;
|
||||||
mIsPunctuationSuggestions = isPunctuationSuggestions;
|
|
||||||
mAllowsToBeAutoCorrected = allowsToBeAutoCorrected;
|
mAllowsToBeAutoCorrected = allowsToBeAutoCorrected;
|
||||||
mSuggestedWordInfoList = suggestedWordInfoList;
|
mIsPunctuationSuggestions = isPunctuationSuggestions;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int size() {
|
public int size() {
|
||||||
|
@ -99,9 +99,9 @@ public class SuggestedWords {
|
||||||
}
|
}
|
||||||
|
|
||||||
public SuggestedWords build() {
|
public SuggestedWords build() {
|
||||||
return new SuggestedWords(mTypedWordValid, mHasMinimalSuggestion,
|
return new SuggestedWords(mSuggestedWordInfoList, mTypedWordValid,
|
||||||
mIsPunctuationSuggestions, mShouldBlockAutoCorrectionBySafetyNet,
|
mHasMinimalSuggestion, mAllowsToBeAutoCorrected,
|
||||||
mAllowsToBeAutoCorrected, mSuggestedWordInfoList);
|
mIsPunctuationSuggestions, mShouldBlockAutoCorrectionBySafetyNet);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue