aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorYohei Yukawa <yukawa@google.com>2014-08-25 04:08:55 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-08-25 04:08:56 +0000
commit5eebaddccbdbd59669d658245eea6e8aca560fc6 (patch)
tree1ab1491a813f6f0b0024d8765423a2a80e55b3d5 /java/src
parent2c4cce8d6c92dc4492e4376a2b3973d76a016fdd (diff)
parent034c3260781f6f42d8f0252379d9fa6fd5c9d4d3 (diff)
downloadlatinime-5eebaddccbdbd59669d658245eea6e8aca560fc6.tar.gz
latinime-5eebaddccbdbd59669d658245eea6e8aca560fc6.tar.xz
latinime-5eebaddccbdbd59669d658245eea6e8aca560fc6.zip
Merge "Dismiss "Add to dictionary" hint with non-special char event" into lmp-dev
Diffstat (limited to 'java/src')
-rw-r--r--java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
index 41d9bdcf7..09799334b 100644
--- a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
+++ b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
@@ -751,6 +751,13 @@ public final class InputLogic {
final InputTransaction inputTransaction,
// TODO: remove this argument
final LatinIME.UIHandler handler) {
+ // In case the "add to dictionary" hint was still displayed.
+ // TODO: Do we really need to check if we have composing text here?
+ if (!mWordComposer.isComposingWord() &&
+ mSuggestionStripViewAccessor.isShowingAddToDictionaryHint()) {
+ mSuggestionStripViewAccessor.dismissAddToDictionaryHint();
+ }
+
final int codePoint = event.mCodePoint;
mSpaceState = SpaceState.NONE;
if (inputTransaction.mSettingsValues.isWordSeparator(codePoint)
@@ -846,8 +853,6 @@ public final class InputLogic {
} else {
sendKeyCodePoint(settingsValues, codePoint);
}
- // In case the "add to dictionary" hint was still displayed.
- mSuggestionStripViewAccessor.dismissAddToDictionaryHint();
}
inputTransaction.setRequiresUpdateSuggestions();
}