aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/SuggestedWords.java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2012-03-09 17:31:53 +0900
committerJean Chalard <jchalard@google.com>2012-03-09 18:36:45 +0900
commitdf9fce5df1bacdffb39c7926bdda4b205f186998 (patch)
tree7dd141bb1b70b88380b6b6110589b5c6b2add49d /java/src/com/android/inputmethod/latin/SuggestedWords.java
parent0cb7b007047b9e7fadcb6024ecc547cf475ceca9 (diff)
downloadlatinime-df9fce5df1bacdffb39c7926bdda4b205f186998.tar.gz
latinime-df9fce5df1bacdffb39c7926bdda4b205f186998.tar.xz
latinime-df9fce5df1bacdffb39c7926bdda4b205f186998.zip
Export some logic out of LatinIME
Hopefully that will end in Suggest/SuggestedWords being autonomous and won't need the logic spoon-fed to them Change-Id: I915661bce13c69c8a5b8e5d4a8c41e18fea594cf
Diffstat (limited to 'java/src/com/android/inputmethod/latin/SuggestedWords.java')
-rw-r--r--java/src/com/android/inputmethod/latin/SuggestedWords.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/java/src/com/android/inputmethod/latin/SuggestedWords.java b/java/src/com/android/inputmethod/latin/SuggestedWords.java
index aad975e46..c92c72004 100644
--- a/java/src/com/android/inputmethod/latin/SuggestedWords.java
+++ b/java/src/com/android/inputmethod/latin/SuggestedWords.java
@@ -90,6 +90,7 @@ public class SuggestedWords {
private boolean mHasMinimalSuggestion;
private boolean mIsPunctuationSuggestions;
private boolean mShouldBlockAutoCorrectionBySafetyNet;
+ private boolean mAllowsToBeAutoCorrected;
private List<SuggestedWordInfo> mSuggestedWordInfoList =
new ArrayList<SuggestedWordInfo>();
@@ -159,6 +160,11 @@ public class SuggestedWords {
return this;
}
+ public Builder setAllowsToBeAutoCorrected(final boolean allowsToBeAutoCorrected) {
+ mAllowsToBeAutoCorrected = allowsToBeAutoCorrected;
+ return this;
+ }
+
// Should get rid of the first one (what the user typed previously) from suggestions
// and replace it with what the user currently typed.
public Builder addTypedWordAndPreviousSuggestions(CharSequence typedWord,
@@ -200,6 +206,10 @@ public class SuggestedWords {
return mTypedWordValid;
}
+ public boolean allowsToBeAutoCorrected() {
+ return mAllowsToBeAutoCorrected;
+ }
+
@Override
public String toString() {
// Pretty-print method to help debug