From 16bfac9ff463ad9324d2ccc15817088e1cfd9eab Mon Sep 17 00:00:00 2001 From: Mohammadinamul Sheik Date: Tue, 16 Sep 2014 12:34:22 -0700 Subject: Add StatsUtils.onAutoCorrection method. Change-Id: I9547b6c0f082ef7c09b251a6458badb65a841229 --- java/src/com/android/inputmethod/latin/WordComposer.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (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 32d1fe372..567aa07f1 100644 --- a/java/src/com/android/inputmethod/latin/WordComposer.java +++ b/java/src/com/android/inputmethod/latin/WordComposer.java @@ -49,6 +49,7 @@ public final class WordComposer { private final ArrayList mEvents; private final InputPointers mInputPointers = new InputPointers(MAX_WORD_LENGTH); private String mAutoCorrection; + private String mAutoCorrectionDictionaryType; private boolean mIsResumed; private boolean mIsBatchMode; // A memory of the last rejected batch mode suggestion, if any. This goes like this: the user @@ -418,8 +419,9 @@ public final class WordComposer { /** * Sets the auto-correction for this word. */ - public void setAutoCorrection(final String correction) { + public void setAutoCorrection(final String correction, String dictType) { mAutoCorrection = correction; + mAutoCorrectionDictionaryType = dictType; } /** @@ -429,6 +431,13 @@ public final class WordComposer { 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