aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorYohei Yukawa <yukawa@google.com>2014-08-25 08:25:34 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-08-25 08:25:34 +0000
commit8c7daa829a3a81b3a803048d7af82383a8b48aed (patch)
treebb132aa020227f3940dfafba8e60f5931ef50a75 /java/src
parenta5687ee9f7c3eff7eb8b97ebfb12fc1d93b9e41c (diff)
parent02716083158c3affbcfc719ff6471112d7397578 (diff)
downloadlatinime-8c7daa829a3a81b3a803048d7af82383a8b48aed.tar.gz
latinime-8c7daa829a3a81b3a803048d7af82383a8b48aed.tar.xz
latinime-8c7daa829a3a81b3a803048d7af82383a8b48aed.zip
am 02716083: am 5eebaddc: Merge "Dismiss "Add to dictionary" hint with non-special char event" into lmp-dev
* commit '02716083158c3affbcfc719ff6471112d7397578': Dismiss "Add to dictionary" hint with non-special char event
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();
}