diff options
author | 2014-06-30 04:42:09 +0000 | |
---|---|---|
committer | 2014-06-26 23:19:11 +0000 | |
commit | 4db7da92f20924a7494dc0b1710413cf9f93a649 (patch) | |
tree | d8d27266a67f238aaf9d64204637b8aee781f092 /java/src/com/android/inputmethod/latin/LatinIME.java | |
parent | e5a8615de706e47ec0a25022aed4df44f4d4b155 (diff) | |
parent | 35c37dbef8a65cc1e199a60090d1b4e60da69fe6 (diff) | |
download | latinime-4db7da92f20924a7494dc0b1710413cf9f93a649.tar.gz latinime-4db7da92f20924a7494dc0b1710413cf9f93a649.tar.xz latinime-4db7da92f20924a7494dc0b1710413cf9f93a649.zip |
Merge "[SD3] Forward the script ID to where it will be used"
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinIME.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/LatinIME.java | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index 6e5e0deaa..c9a4bf5a1 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -227,7 +227,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen case MSG_RESUME_SUGGESTIONS: latinIme.mInputLogic.restartSuggestionsOnWordTouchedByCursor( latinIme.mSettings.getCurrent(), - msg.arg1 == ARG1_TRUE /* shouldIncludeResumedWordInSuggestions */); + msg.arg1 == ARG1_TRUE /* shouldIncludeResumedWordInSuggestions */, + latinIme.mKeyboardSwitcher.getCurrentKeyboardScriptId()); break; case MSG_REOPEN_DICTIONARIES: latinIme.resetSuggest(); @@ -1239,7 +1240,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen final Event event = createSoftwareKeypressEvent(codeToSend, keyX, keyY, isKeyRepeat); final InputTransaction completeInputTransaction = mInputLogic.onCodeInput(mSettings.getCurrent(), event, - mKeyboardSwitcher.getKeyboardShiftMode(), mHandler); + mKeyboardSwitcher.getKeyboardShiftMode(), + mKeyboardSwitcher.getCurrentKeyboardScriptId(), mHandler); updateStateAfterInputTransaction(completeInputTransaction); mKeyboardSwitcher.onCodeInput(codePoint, getCurrentAutoCapsState(), getCurrentRecapitalizeState()); @@ -1423,10 +1425,12 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen // Called from {@link SuggestionStripView} through the {@link SuggestionStripView#Listener} // interface @Override - public void pickSuggestionManually(final int index, final SuggestedWordInfo suggestionInfo) { + public void pickSuggestionManually(final SuggestedWordInfo suggestionInfo) { final InputTransaction completeInputTransaction = mInputLogic.onPickSuggestionManually( - mSettings.getCurrent(), index, suggestionInfo, - mKeyboardSwitcher.getKeyboardShiftMode(), mHandler); + mSettings.getCurrent(), suggestionInfo, + mKeyboardSwitcher.getKeyboardShiftMode(), + mKeyboardSwitcher.getCurrentKeyboardScriptId(), + mHandler); updateStateAfterInputTransaction(completeInputTransaction); } @@ -1553,7 +1557,10 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen // If it's handled, we return true because we did handle it. if (event.isHandled()) { mInputLogic.onCodeInput(mSettings.getCurrent(), event, - mKeyboardSwitcher.getKeyboardShiftMode(), mHandler); + mKeyboardSwitcher.getKeyboardShiftMode(), + // TODO: this is not necessarily correct for a hardware keyboard right now + mKeyboardSwitcher.getCurrentKeyboardScriptId(), + mHandler); return true; } return super.onKeyDown(keyCode, keyEvent); |