aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/LatinIME.java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2011-09-01 22:57:39 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-09-01 22:57:39 -0700
commit66a5884ad8df544f1c462148e763b29c7202f7b8 (patch)
tree1d4b256d491932f11df83ad40e040abd004d1fca /java/src/com/android/inputmethod/latin/LatinIME.java
parent78778ca9df9e75ece5beadd314ed0ed77dbd2a02 (diff)
parent1531528bfe01d0ce88888d23952a4c7092a15f17 (diff)
downloadlatinime-66a5884ad8df544f1c462148e763b29c7202f7b8.tar.gz
latinime-66a5884ad8df544f1c462148e763b29c7202f7b8.tar.xz
latinime-66a5884ad8df544f1c462148e763b29c7202f7b8.zip
Merge "Add an option to prevent insertion of suggestion spans"
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinIME.java')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java10
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;