Merge "Simplification (A31)"
This commit is contained in:
commit
defc2e2efa
1 changed files with 2 additions and 6 deletions
|
@ -227,7 +227,7 @@ public class Suggest {
|
||||||
mWhiteListDictionary.getWhitelistedWord(consideredWord);
|
mWhiteListDictionary.getWhitelistedWord(consideredWord);
|
||||||
|
|
||||||
final boolean hasAutoCorrection;
|
final boolean hasAutoCorrection;
|
||||||
if (!isCorrectionEnabled) {
|
if (!isCorrectionEnabled || wordComposer.isMostlyCaps() || wordComposer.isResumed()) {
|
||||||
hasAutoCorrection = false;
|
hasAutoCorrection = false;
|
||||||
} else if (null != whitelistedWord) {
|
} else if (null != whitelistedWord) {
|
||||||
hasAutoCorrection = true;
|
hasAutoCorrection = true;
|
||||||
|
@ -243,10 +243,6 @@ public class Suggest {
|
||||||
} else {
|
} else {
|
||||||
hasAutoCorrection = false;
|
hasAutoCorrection = false;
|
||||||
}
|
}
|
||||||
boolean autoCorrectionAvailable = hasAutoCorrection;
|
|
||||||
// Don't auto-correct words with multiple capital letter
|
|
||||||
autoCorrectionAvailable &= !wordComposer.isMostlyCaps();
|
|
||||||
autoCorrectionAvailable &= !wordComposer.isResumed();
|
|
||||||
|
|
||||||
if (whitelistedWord != null) {
|
if (whitelistedWord != null) {
|
||||||
suggestionsSet.add(new SuggestedWordInfo(whitelistedWord,
|
suggestionsSet.add(new SuggestedWordInfo(whitelistedWord,
|
||||||
|
@ -305,7 +301,7 @@ public class Suggest {
|
||||||
// actual word, it says typedWordValid = false, which looks wrong. We should either
|
// actual word, it says typedWordValid = false, which looks wrong. We should either
|
||||||
// rename the attribute or change the value.
|
// rename the attribute or change the value.
|
||||||
!isPrediction && !allowsToBeAutoCorrected /* typedWordValid */,
|
!isPrediction && !allowsToBeAutoCorrected /* typedWordValid */,
|
||||||
!isPrediction && autoCorrectionAvailable /* hasAutoCorrectionCandidate */,
|
!isPrediction && hasAutoCorrection, /* hasAutoCorrectionCandidate */
|
||||||
false /* isPunctuationSuggestions */,
|
false /* isPunctuationSuggestions */,
|
||||||
false /* isObsoleteSuggestions */,
|
false /* isObsoleteSuggestions */,
|
||||||
isPrediction);
|
isPrediction);
|
||||||
|
|
Loading…
Reference in a new issue