aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/Suggest.java
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2011-02-07 20:40:34 +0900
committerTadashi G. Takaoka <takaoka@google.com>2011-02-08 11:43:39 +0900
commit5ef096f5f601c759e8a4a888aaca91ac5ccd9974 (patch)
tree921d040d25bb2bdfe0d2644a3a5871da8fd5d4d3 /java/src/com/android/inputmethod/latin/Suggest.java
parent8dac5fe98d586b5bea9f18ed3d8f2cc4d3588102 (diff)
downloadlatinime-5ef096f5f601c759e8a4a888aaca91ac5ccd9974.tar.gz
latinime-5ef096f5f601c759e8a4a888aaca91ac5ccd9974.tar.xz
latinime-5ef096f5f601c759e8a4a888aaca91ac5ccd9974.zip
Move and rename computeProximityThreshold
Move and rename KeyboardView.computeProximityThreshold to KeyDetector.getMostCommonKeyWidth. And make it public for unit test use. This is a part of multi-project change (If751659a, Idb18f362) Bug: 3414081 Change-Id: If751659a53c7412f836d6d28866760ffe84b179b
Diffstat (limited to 'java/src/com/android/inputmethod/latin/Suggest.java')
-rw-r--r--java/src/com/android/inputmethod/latin/Suggest.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/java/src/com/android/inputmethod/latin/Suggest.java b/java/src/com/android/inputmethod/latin/Suggest.java
index 7bd6d91d2..85a4903f6 100644
--- a/java/src/com/android/inputmethod/latin/Suggest.java
+++ b/java/src/com/android/inputmethod/latin/Suggest.java
@@ -80,7 +80,7 @@ public class Suggest implements Dictionary.WordCallback {
private static final int PREF_MAX_BIGRAMS = 60;
- private boolean mAutoTextEnabled;
+ private boolean mQuickFixesEnabled;
private double mAutoCorrectionThreshold;
private int[] mPriorities = new int[mPrefMaxSuggestions];
@@ -116,8 +116,8 @@ public class Suggest implements Dictionary.WordCallback {
}
}
- public void setAutoTextEnabled(boolean enabled) {
- mAutoTextEnabled = enabled;
+ public void setQuickFixesEnabled(boolean enabled) {
+ mQuickFixesEnabled = enabled;
}
public int getCorrectionMode() {
@@ -309,7 +309,7 @@ public class Suggest implements Dictionary.WordCallback {
if (typedWord != null) {
mSuggestions.add(0, typedWord.toString());
}
- if (mAutoTextEnabled) {
+ if (mQuickFixesEnabled) {
int i = 0;
int max = 6;
// Don't autotext the suggestions from the dictionaries
@@ -416,12 +416,12 @@ public class Suggest implements Dictionary.WordCallback {
return mHasAutoCorrection;
}
- private boolean compareCaseInsensitive(final String mLowerOriginalWord,
+ private static boolean compareCaseInsensitive(final String lowerOriginalWord,
final char[] word, final int offset, final int length) {
- final int originalLength = mLowerOriginalWord.length();
+ final int originalLength = lowerOriginalWord.length();
if (originalLength == length && Character.isUpperCase(word[offset])) {
for (int i = 0; i < originalLength; i++) {
- if (mLowerOriginalWord.charAt(i) != Character.toLowerCase(word[offset+i])) {
+ if (lowerOriginalWord.charAt(i) != Character.toLowerCase(word[offset+i])) {
return false;
}
}