aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2012-05-09 15:19:35 +0900
committerJean Chalard <jchalard@google.com>2012-05-09 15:19:35 +0900
commit736b109e1692374f5a2739885c8f931dbb8be1f2 (patch)
treee1193bbba194144db01f4d663ad71b8b80235972 /java/src/com/android/inputmethod
parent67b2c5840474d3d331333cd11875fa97532f55c5 (diff)
downloadlatinime-736b109e1692374f5a2739885c8f931dbb8be1f2.tar.gz
latinime-736b109e1692374f5a2739885c8f931dbb8be1f2.tar.xz
latinime-736b109e1692374f5a2739885c8f931dbb8be1f2.zip
Don't ask for surrounding characters for each keypress
Bug: 6464226 Change-Id: I03745bbcc21e5ec6ca57fa1257bf21c0cd26391a
Diffstat (limited to 'java/src/com/android/inputmethod')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java26
1 files changed, 12 insertions, 14 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index 796d4ac79..b4be7e696 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -1480,20 +1480,18 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
if ((isAlphabet(primaryCode)
|| mSettingsValues.isSymbolExcludedFromWordSeparators(primaryCode))
- && isSuggestionsRequested() && !isCursorTouchingWord()) {
- if (!isComposingWord) {
- // Reset entirely the composing state anyway, then start composing a new word unless
- // the character is a single quote. The idea here is, single quote is not a
- // separator and it should be treated as a normal character, except in the first
- // position where it should not start composing a word.
- isComposingWord = (Keyboard.CODE_SINGLE_QUOTE != primaryCode);
- // Here we don't need to reset the last composed word. It will be reset
- // when we commit this one, if we ever do; if on the other hand we backspace
- // it entirely and resume suggestions on the previous word, we'd like to still
- // have touch coordinates for it.
- resetComposingState(false /* alsoResetLastComposedWord */);
- clearSuggestions();
- }
+ && isSuggestionsRequested() && !isComposingWord && !isCursorTouchingWord()) {
+ // Reset entirely the composing state anyway, then start composing a new word unless
+ // the character is a single quote. The idea here is, single quote is not a
+ // separator and it should be treated as a normal character, except in the first
+ // position where it should not start composing a word.
+ isComposingWord = (Keyboard.CODE_SINGLE_QUOTE != primaryCode);
+ // Here we don't need to reset the last composed word. It will be reset
+ // when we commit this one, if we ever do; if on the other hand we backspace
+ // it entirely and resume suggestions on the previous word, we'd like to still
+ // have touch coordinates for it.
+ resetComposingState(false /* alsoResetLastComposedWord */);
+ clearSuggestions();
}
if (isComposingWord) {
mWordComposer.add(