diff options
author | 2012-05-18 11:05:30 +0900 | |
---|---|---|
committer | 2012-05-18 12:07:58 +0900 | |
commit | d4cacb1e41263ea4d78e7328f9d7ee173b79c4ea (patch) | |
tree | 7e28dc0ada902e63986685e4b734cd2abe2b2f10 /java/src | |
parent | 817a66e7e6bc9eb0bc74bacf0431308f40185cb1 (diff) | |
download | latinime-d4cacb1e41263ea4d78e7328f9d7ee173b79c4ea.tar.gz latinime-d4cacb1e41263ea4d78e7328f9d7ee173b79c4ea.tar.xz latinime-d4cacb1e41263ea4d78e7328f9d7ee173b79c4ea.zip |
Close batch edit
This does the same thing as Ie30e1aff but differently
Bug: 6512086
Change-Id: I47ae990510d3f657abd45ad5f0e325d93dec83c0
Diffstat (limited to 'java/src')
-rw-r--r-- | java/src/com/android/inputmethod/latin/LatinIME.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index 261755f53..bdefaee92 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -1834,10 +1834,15 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen @Override public void pickSuggestionManually(final int index, final CharSequence suggestion, int x, int y) { - final SuggestedWords suggestedWords = mSuggestionsView.getSuggestions(); final InputConnection ic = getCurrentInputConnection(); - if (ic != null) ic.beginBatchEdit(); + if (null != ic) ic.beginBatchEdit(); + pickSuggestionManuallyWhileInBatchEdit(index, suggestion, x, y, ic); + if (null != ic) ic.endBatchEdit(); + } + public void pickSuggestionManuallyWhileInBatchEdit(final int index, + final CharSequence suggestion, final int x, final int y, final InputConnection ic) { + final SuggestedWords suggestedWords = mSuggestionsView.getSuggestions(); // If this is a punctuation picked from the suggestion strip, pass it to onCodeInput if (suggestion.length() == 1 && isShowingPunctuationList()) { // Word separators are suggested before the user inputs something. @@ -1933,7 +1938,6 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen mHandler.postUpdateSuggestions(); } } - if (null != ic) ic.endBatchEdit(); } /** |