aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/WordComposer.java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2014-10-07 19:29:05 +0900
committerJean Chalard <jchalard@google.com>2014-10-08 21:46:13 +0900
commit176ad53c6fee47df7595e7501e7e2829d990364d (patch)
tree4a7b172f668b9cd6efd901a1cc6bfba8d019cb83 /java/src/com/android/inputmethod/latin/WordComposer.java
parent5a84f69eaec925e849124000cb600f5a8d5103df (diff)
downloadlatinime-176ad53c6fee47df7595e7501e7e2829d990364d.tar.gz
latinime-176ad53c6fee47df7595e7501e7e2829d990364d.tar.xz
latinime-176ad53c6fee47df7595e7501e7e2829d990364d.zip
[ML18] Make WordComposer#getAutoCorrection a word info
Bug: 11230254 Change-Id: I6ad2e7f89862fbfe7af5502961643320c782347f
Diffstat (limited to 'java/src/com/android/inputmethod/latin/WordComposer.java')
-rw-r--r--java/src/com/android/inputmethod/latin/WordComposer.java18
1 files changed, 5 insertions, 13 deletions
diff --git a/java/src/com/android/inputmethod/latin/WordComposer.java b/java/src/com/android/inputmethod/latin/WordComposer.java
index 157bd1565..5eb338eb3 100644
--- a/java/src/com/android/inputmethod/latin/WordComposer.java
+++ b/java/src/com/android/inputmethod/latin/WordComposer.java
@@ -18,6 +18,7 @@ package com.android.inputmethod.latin;
import com.android.inputmethod.event.CombinerChain;
import com.android.inputmethod.event.Event;
+import com.android.inputmethod.latin.SuggestedWords.SuggestedWordInfo;
import com.android.inputmethod.latin.define.DebugFlags;
import com.android.inputmethod.latin.utils.CoordinateUtils;
import com.android.inputmethod.latin.utils.StringUtils;
@@ -48,8 +49,7 @@ public final class WordComposer {
// The list of events that served to compose this string.
private final ArrayList<Event> mEvents;
private final InputPointers mInputPointers = new InputPointers(MAX_WORD_LENGTH);
- private String mAutoCorrection;
- private String mAutoCorrectionDictionaryType;
+ private SuggestedWordInfo mAutoCorrection;
private boolean mIsResumed;
private boolean mIsBatchMode;
// A memory of the last rejected batch mode suggestion, if any. This goes like this: the user
@@ -418,26 +418,18 @@ public final class WordComposer {
/**
* Sets the auto-correction for this word.
*/
- public void setAutoCorrection(final String correction, String dictType) {
- mAutoCorrection = correction;
- mAutoCorrectionDictionaryType = dictType;
+ public void setAutoCorrection(final SuggestedWordInfo autoCorrection) {
+ mAutoCorrection = autoCorrection;
}
/**
* @return the auto-correction for this word, or null if none.
*/
- public String getAutoCorrectionOrNull() {
+ public SuggestedWordInfo getAutoCorrectionOrNull() {
return mAutoCorrection;
}
/**
- * @return the auto-correction dictionary type or null if none.
- */
- public String getAutoCorrectionDictionaryTypeOrNull() {
- return mAutoCorrectionDictionaryType;
- }
-
- /**
* @return whether we started composing this word by resuming suggestion on an existing string
*/
public boolean isResumed() {