From 5262fe8832e69b5d4b2c575524da3757435644f0 Mon Sep 17 00:00:00 2001 From: Jean Chalard Date: Tue, 21 Feb 2012 20:16:30 -0800 Subject: [PATCH] Dismiss the hint on a non-word-starting non-separator This would happen when a character is not a separator but is not a word starter. Such characters include single quote and dollar, and others non-letter, non-separator chars. We set the bigram predictions if any - if not so configured, this will fallback on setting back punctuations into the strip. Bug: 6010408 Change-Id: Id203bbe87f8c13de0d5027b555c9067c7ec98f92 --- java/src/com/android/inputmethod/latin/LatinIME.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index 12ddbbddf..da268451b 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -1603,6 +1603,15 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar swapSwapperAndSpaceWhileInBatchEdit(ic); mSpaceState = SPACE_STATE_WEAK; } + // Some characters are not word separators, yet they don't start a new + // composing span. For these, we haven't changed the suggestion strip, and + // if the "add to dictionary" hint is shown, we should do so now. Examples of + // such characters include single quote, dollar, and others; the exact list is + // the list of characters for which we enter handleCharacterWhileInBatchEdit + // that don't match the test if ((isAlphabet...)) at the top of this method. + if (null != mSuggestionsView && mSuggestionsView.dismissAddToDictionaryHint()) { + mHandler.postUpdateBigramPredictions(); + } } Utils.Stats.onNonSeparator((char)primaryCode, x, y); }