diff options
author | 2011-09-02 14:09:10 +0900 | |
---|---|---|
committer | 2011-09-02 14:43:13 +0900 | |
commit | 1531528bfe01d0ce88888d23952a4c7092a15f17 (patch) | |
tree | b1643103946a8a12382bb9bf56df62ba2cf5a415 /java/src/com/android/inputmethod/latin/LatinIME.java | |
parent | 2e58804a98e92aa134ed748d2de12ff885f27e14 (diff) | |
download | latinime-1531528bfe01d0ce88888d23952a4c7092a15f17.tar.gz latinime-1531528bfe01d0ce88888d23952a4c7092a15f17.tar.xz latinime-1531528bfe01d0ce88888d23952a4c7092a15f17.zip |
Add an option to prevent insertion of suggestion spans
This is to help debug of
Bug: 5250788
Change-Id: I961321aff3776c4912eaf7a1fa4de0c01d715f24
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinIME.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/LatinIME.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index 85363fd36..cea59fe0a 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -1807,9 +1807,13 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar final InputConnection ic = getCurrentInputConnection(); if (ic != null) { mVoiceProxy.rememberReplacedWord(bestWord, mSettingsValues.mWordSeparators); - SuggestedWords suggestedWords = mSuggestionsView.getSuggestions(); - ic.commitText(SuggestionSpanUtils.getTextWithSuggestionSpan( - this, bestWord, suggestedWords), 1); + if (mSettingsValues.mEnableSuggestionSpanInsertion) { + final SuggestedWords suggestedWords = mSuggestionsView.getSuggestions(); + ic.commitText(SuggestionSpanUtils.getTextWithSuggestionSpan( + this, bestWord, suggestedWords), 1); + } else { + ic.commitText(bestWord, 1); + } } mRecorrection.saveRecorrectionSuggestion(mWordComposer, bestWord); mHasUncommittedTypedChars = false; |