From 176ad53c6fee47df7595e7501e7e2829d990364d Mon Sep 17 00:00:00 2001 From: Jean Chalard Date: Tue, 7 Oct 2014 19:29:05 +0900 Subject: [ML18] Make WordComposer#getAutoCorrection a word info Bug: 11230254 Change-Id: I6ad2e7f89862fbfe7af5502961643320c782347f --- .../com/android/inputmethod/latin/WordComposer.java | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) (limited to 'java/src/com/android/inputmethod/latin/WordComposer.java') 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 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,25 +418,17 @@ 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 */ -- cgit v1.2.3-83-g751a