diff options
author | 2014-03-04 05:36:00 +0000 | |
---|---|---|
committer | 2014-03-04 05:36:00 +0000 | |
commit | 27c23c691c77b933422e3476876837765f9a7bdf (patch) | |
tree | 1cb4322fd8de2c810855aea7f9e4b23a4e02b18f /java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java | |
parent | ddc21f5bd1113c24840fd436d09de62c8e476335 (diff) | |
parent | 32c6d4caea8e1391804f405d78e33e5c0fe89b4b (diff) | |
download | latinime-27c23c691c77b933422e3476876837765f9a7bdf.tar.gz latinime-27c23c691c77b933422e3476876837765f9a7bdf.tar.xz latinime-27c23c691c77b933422e3476876837765f9a7bdf.zip |
Merge "[IL111] Remove a member."
Diffstat (limited to 'java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java index f2f9f1e68..8b83155ea 100644 --- a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java +++ b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java @@ -227,17 +227,16 @@ public final class InputLogic { } } - // TODO: stop relying on mApplicationSpecifiedCompletions. The SuggestionInfo object - // should contain a reference to the CompletionInfo instead. - if (settingsValues.isApplicationSpecifiedCompletionsOn() - && mLatinIME.mApplicationSpecifiedCompletions != null - && index >= 0 && index < mLatinIME.mApplicationSpecifiedCompletions.length) { + // TODO: We should not need the following branch. We should be able to take the same + // code path as for other kinds, use commitChosenWord, and do everything normally. We will + // however need to reset the suggestion strip right away, because we know we can't take + // the risk of calling commitCompletion twice because we don't know how the app will react. + if (SuggestedWordInfo.KIND_APP_DEFINED == suggestionInfo.mKind) { mSuggestedWords = SuggestedWords.EMPTY; mSuggestionStripViewAccessor.setNeutralSuggestionStrip(); keyboardSwitcher.updateShiftState(); resetComposingState(true /* alsoResetLastComposedWord */); - final CompletionInfo completionInfo = mLatinIME.mApplicationSpecifiedCompletions[index]; - mConnection.commitCompletion(completionInfo); + mConnection.commitCompletion(suggestionInfo.mApplicationSpecifiedCompletionInfo); mConnection.endBatchEdit(); return; } |