diff options
author | 2012-03-09 12:30:23 +0900 | |
---|---|---|
committer | 2012-03-09 12:30:23 +0900 | |
commit | 13fb8fb775f77610105115d7cb30f6177ec6d771 (patch) | |
tree | 7ce9a221c74c72af2c7b431bd4072aa714b8fdb9 /java/src/com/android/inputmethod/latin/Suggest.java | |
parent | 23a5e9d1a78f42e76996e756fd1d6a37fc2ac679 (diff) | |
download | latinime-13fb8fb775f77610105115d7cb30f6177ec6d771.tar.gz latinime-13fb8fb775f77610105115d7cb30f6177ec6d771.tar.xz latinime-13fb8fb775f77610105115d7cb30f6177ec6d771.zip |
Limit escape of parameters
Change-Id: I3a7ab069042d5542ab2e033d1eeb13d718cd7698
Diffstat (limited to 'java/src/com/android/inputmethod/latin/Suggest.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/Suggest.java | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/java/src/com/android/inputmethod/latin/Suggest.java b/java/src/com/android/inputmethod/latin/Suggest.java index 889d50552..a2131605d 100644 --- a/java/src/com/android/inputmethod/latin/Suggest.java +++ b/java/src/com/android/inputmethod/latin/Suggest.java @@ -218,10 +218,6 @@ public class Suggest implements Dictionary.WordCallback { mAutoCorrectionThreshold = threshold; } - public boolean isAggressiveAutoCorrectionMode() { - return (mAutoCorrectionThreshold == 0); - } - /** * Number of suggestions to generate from the input key sequence. This has * to be a number between 1 and 100 (inclusive). @@ -554,7 +550,8 @@ public class Suggest implements Dictionary.WordCallback { // TODO: Resolve the inconsistencies between the native auto correction algorithms and // this safety net public static boolean shouldBlockAutoCorrectionBySafetyNet( - SuggestedWords.Builder suggestedWordsBuilder, Suggest suggest) { + final SuggestedWords.Builder suggestedWordsBuilder, final Suggest suggest, + final double autoCorrectionThreshold) { // Safety net for auto correction. // Actually if we hit this safety net, it's actually a bug. if (suggestedWordsBuilder.size() <= 1 || suggestedWordsBuilder.isTypedWordValid()) { @@ -562,7 +559,7 @@ public class Suggest implements Dictionary.WordCallback { } // If user selected aggressive auto correction mode, there is no need to use the safety // net. - if (suggest.isAggressiveAutoCorrectionMode()) { + if (0 == autoCorrectionThreshold) { return false; } final CharSequence typedWord = suggestedWordsBuilder.getWord(0); |