aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2010-12-12 17:58:29 +0900
committerTadashi G. Takaoka <takaoka@google.com>2010-12-12 22:23:39 +0900
commit4ca16dbd65150359c3884da7cb59a30f19abd4b7 (patch)
tree0d306bca3dd2ffdb023d0ddc08e9e130339ba560 /java/src
parent1b1f7f907f6c7d6e849c88ca06c3608bc84d7c5f (diff)
downloadlatinime-4ca16dbd65150359c3884da7cb59a30f19abd4b7.tar.gz
latinime-4ca16dbd65150359c3884da7cb59a30f19abd4b7.tar.xz
latinime-4ca16dbd65150359c3884da7cb59a30f19abd4b7.zip
Highlight auto corrected word
Bug: 3230726 Bug: 3215175 Change-Id: I086324cdab610b50a96d8eb08b81aa89c886ba00
Diffstat (limited to 'java/src')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index a34d883ba..010473f05 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -633,7 +633,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
if (isSuggestionShown() && isPredictionOn()) {
// First get the cursor position. This is required by setOldSuggestions(), so that
// it can pass the correct range to setComposingRegion(). At this point, we don't
- // have valid values for mLastSelectionStart/Stop because onUpdateSelection() has
+ // have valid values for mLastSelectionStart/End because onUpdateSelection() has
// not been called yet.
ExtractedTextRequest etr = new ExtractedTextRequest();
etr.token = 0; // anything is fine here
@@ -1339,7 +1339,11 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
CharSequence typedWord = mWord.getTypedWord();
TextEntryState.backToAcceptedDefault(typedWord);
if (!TextUtils.isEmpty(typedWord) && !typedWord.equals(mBestWord)) {
- // TODO: Will call InputConnection.commitCorrection() here.
+ if (ic != null) {
+ CorrectionInfo correctionInfo = new CorrectionInfo(
+ mLastSelectionEnd - typedWord.length(), typedWord, mBestWord);
+ ic.commitCorrection(correctionInfo);
+ }
if (mCandidateView != null)
mCandidateView.onAutoCorrectionInverted(mBestWord);
}