aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/LatinIME.java
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2012-10-07 09:02:09 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2012-10-07 09:02:09 -0700
commitc0a5f07c9bf93962e3082ca770aa32f96811bcd9 (patch)
treec2e4ba3ecd92325b404150c4262485f1c73f6615 /java/src/com/android/inputmethod/latin/LatinIME.java
parent478605baa460d2d595c7ed0da2790b147727d284 (diff)
parent792980d4aa4d0d91a5acfcbaba3f4471f1d2c073 (diff)
downloadlatinime-c0a5f07c9bf93962e3082ca770aa32f96811bcd9.tar.gz
latinime-c0a5f07c9bf93962e3082ca770aa32f96811bcd9.tar.xz
latinime-c0a5f07c9bf93962e3082ca770aa32f96811bcd9.zip
am 792980d4: Avoid calling switchToLastInputMethod when other IMEs are in effect (DO NOT MERGE)
* commit '792980d4aa4d0d91a5acfcbaba3f4471f1d2c073': Avoid calling switchToLastInputMethod when other IMEs are in effect (DO NOT MERGE)
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinIME.java')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java13
1 files changed, 8 insertions, 5 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index fe6ad4901..d98966e96 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -1219,22 +1219,25 @@ public final class LatinIME extends InputMethodService implements KeyboardAction
mConnection.performEditorAction(actionId);
}
+ // TODO: Revise the language switch key behavior to make it much smarter and more reasonable.
private void handleLanguageSwitchKey() {
- final boolean includesOtherImes = mCurrentSettings.mIncludesOtherImesInLanguageSwitchList;
final IBinder token = getWindow().getWindow().getAttributes().token;
+ if (mCurrentSettings.mIncludesOtherImesInLanguageSwitchList) {
+ mImm.switchToNextInputMethod(token, false /* onlyCurrentIme */);
+ return;
+ }
if (mShouldSwitchToLastSubtype) {
final InputMethodSubtype lastSubtype = mImm.getLastInputMethodSubtype();
final boolean lastSubtypeBelongsToThisIme =
ImfUtils.checkIfSubtypeBelongsToThisImeAndEnabled(this, lastSubtype);
- if ((includesOtherImes || lastSubtypeBelongsToThisIme)
- && mImm.switchToLastInputMethod(token)) {
+ if (lastSubtypeBelongsToThisIme && mImm.switchToLastInputMethod(token)) {
mShouldSwitchToLastSubtype = false;
} else {
- mImm.switchToNextInputMethod(token, !includesOtherImes);
+ mImm.switchToNextInputMethod(token, true /* onlyCurrentIme */);
mShouldSwitchToLastSubtype = true;
}
} else {
- mImm.switchToNextInputMethod(token, !includesOtherImes);
+ mImm.switchToNextInputMethod(token, true /* onlyCurrentIme */);
}
}