aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2012-06-29 02:22:05 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-06-29 02:22:05 -0700
commitf2af726f79ce0812483e156b52b4f19c6d852c4b (patch)
tree7ca4294808cd105585c66d9f2897fe1a77e081fe /java/src
parentaa246f23ce04f0930cf6b6e10b67fbf9156720a7 (diff)
parent1b2e2d893d45ba394a2aff419d8212d9f59eba87 (diff)
downloadlatinime-f2af726f79ce0812483e156b52b4f19c6d852c4b.tar.gz
latinime-f2af726f79ce0812483e156b52b4f19c6d852c4b.tar.xz
latinime-f2af726f79ce0812483e156b52b4f19c6d852c4b.zip
Merge "Add a more synthetic variable (A33)"
Diffstat (limited to 'java/src')
-rw-r--r--java/src/com/android/inputmethod/latin/SuggestedWords.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/java/src/com/android/inputmethod/latin/SuggestedWords.java b/java/src/com/android/inputmethod/latin/SuggestedWords.java
index 0d64ad321..b84820cb8 100644
--- a/java/src/com/android/inputmethod/latin/SuggestedWords.java
+++ b/java/src/com/android/inputmethod/latin/SuggestedWords.java
@@ -29,6 +29,7 @@ public class SuggestedWords {
public final boolean mTypedWordValid;
public final boolean mHasAutoCorrectionCandidate;
+ public final boolean mWillAutoCorrect;
public final boolean mIsPunctuationSuggestions;
public final boolean mIsObsoleteSuggestions;
public final boolean mIsPrediction;
@@ -43,6 +44,7 @@ public class SuggestedWords {
mSuggestedWordInfoList = suggestedWordInfoList;
mTypedWordValid = typedWordValid;
mHasAutoCorrectionCandidate = hasAutoCorrectionCandidate;
+ mWillAutoCorrect = !mTypedWordValid && mHasAutoCorrectionCandidate;
mIsPunctuationSuggestions = isPunctuationSuggestions;
mIsObsoleteSuggestions = isObsoleteSuggestions;
mIsPrediction = isPrediction;
@@ -69,7 +71,7 @@ public class SuggestedWords {
}
public boolean willAutoCorrect() {
- return !mTypedWordValid && mHasAutoCorrectionCandidate;
+ return mWillAutoCorrect;
}
@Override