Remove a useless escape

Change-Id: I1ef0685cc9888c9cef9f60015d32b66dde75ef9b
This commit is contained in:
Jean Chalard 2012-03-09 21:10:55 +09:00
parent d5f618e90a
commit 28e59b98c6
2 changed files with 4 additions and 7 deletions

View file

@ -454,7 +454,8 @@ public class Suggest implements Dictionary.WordCallback {
autoCorrectionAvailable &= !wordComposer.isMostlyCaps(); autoCorrectionAvailable &= !wordComposer.isMostlyCaps();
builder.setTypedWordValid(!allowsToBeAutoCorrected).setHasMinimalSuggestion( builder.setTypedWordValid(!allowsToBeAutoCorrected).setHasMinimalSuggestion(
autoCorrectionAvailable); autoCorrectionAvailable);
if (Suggest.shouldBlockAutoCorrectionBySafetyNet(builder, this, mAutoCorrectionThreshold)) { if (Suggest.shouldBlockAutoCorrectionBySafetyNet(builder, this, mAutoCorrectionThreshold,
!allowsToBeAutoCorrected)) {
builder.setShouldBlockAutoCorrectionBySafetyNet(); builder.setShouldBlockAutoCorrectionBySafetyNet();
} }
return builder; return builder;
@ -609,10 +610,10 @@ public class Suggest implements Dictionary.WordCallback {
// this safety net // this safety net
public static boolean shouldBlockAutoCorrectionBySafetyNet( public static boolean shouldBlockAutoCorrectionBySafetyNet(
final SuggestedWords.Builder suggestedWordsBuilder, final Suggest suggest, final SuggestedWords.Builder suggestedWordsBuilder, final Suggest suggest,
final double autoCorrectionThreshold) { final double autoCorrectionThreshold, final boolean isTypedWordValid) {
// Safety net for auto correction. // Safety net for auto correction.
// Actually if we hit this safety net, it's actually a bug. // Actually if we hit this safety net, it's actually a bug.
if (suggestedWordsBuilder.size() <= 1 || suggestedWordsBuilder.isTypedWordValid()) { if (suggestedWordsBuilder.size() <= 1 || isTypedWordValid) {
return false; return false;
} }
// If user selected aggressive auto correction mode, there is no need to use the safety // If user selected aggressive auto correction mode, there is no need to use the safety

View file

@ -208,10 +208,6 @@ public class SuggestedWords {
return mWords.get(pos); return mWords.get(pos);
} }
public boolean isTypedWordValid() {
return mTypedWordValid;
}
public boolean allowsToBeAutoCorrected() { public boolean allowsToBeAutoCorrected() {
return mAllowsToBeAutoCorrected; return mAllowsToBeAutoCorrected;
} }