am 8c7daa82: am 02716083: am 5eebaddc: Merge "Dismiss "Add to dictionary" hint with non-special char event" into lmp-dev

* commit '8c7daa829a3a81b3a803048d7af82383a8b48aed':
  Dismiss "Add to dictionary" hint with non-special char event
This commit is contained in:
Yohei Yukawa 2014-08-25 09:10:37 +00:00 committed by Android Git Automerger
commit 34439d70e2

View file

@ -751,6 +751,13 @@ public final class InputLogic {
final InputTransaction inputTransaction, final InputTransaction inputTransaction,
// TODO: remove this argument // TODO: remove this argument
final LatinIME.UIHandler handler) { 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; final int codePoint = event.mCodePoint;
mSpaceState = SpaceState.NONE; mSpaceState = SpaceState.NONE;
if (inputTransaction.mSettingsValues.isWordSeparator(codePoint) if (inputTransaction.mSettingsValues.isWordSeparator(codePoint)
@ -846,8 +853,6 @@ public final class InputLogic {
} else { } else {
sendKeyCodePoint(settingsValues, codePoint); sendKeyCodePoint(settingsValues, codePoint);
} }
// In case the "add to dictionary" hint was still displayed.
mSuggestionStripViewAccessor.dismissAddToDictionaryHint();
} }
inputTransaction.setRequiresUpdateSuggestions(); inputTransaction.setRequiresUpdateSuggestions();
} }