diff options
author | 2012-04-18 17:39:57 +0900 | |
---|---|---|
committer | 2012-04-18 18:01:29 +0900 | |
commit | 55d28fd1b2631a63542a647f693d8a8ed749bcf7 (patch) | |
tree | df97b2d22b588544a11727a2cb8659de0d78e169 /java/src/com/android/inputmethod/latin/LatinIME.java | |
parent | feea31e9ce54f0bd88139987363583fab94ff32d (diff) | |
download | latinime-55d28fd1b2631a63542a647f693d8a8ed749bcf7.tar.gz latinime-55d28fd1b2631a63542a647f693d8a8ed749bcf7.tar.xz latinime-55d28fd1b2631a63542a647f693d8a8ed749bcf7.zip |
Cleanup InputMethodManagerCompatWrapper
Change-Id: Id3b84ee19bb504ed8fbb398e260cc663a5b5ae0d
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinIME.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/LatinIME.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index deb956753..aea6add56 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -441,7 +441,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen loadSettings(); - SubtypeUtils.setAdditionalInputMethodSubtypes( + ImfUtils.setAdditionalInputMethodSubtypes( this, mSettingsValues.getPrefefinedAdditionalSubtypes()); // TODO: remove the following when it's not needed by updateCorrectionMode() any more @@ -1134,7 +1134,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen if (isShowingOptionDialog()) return false; switch (requestCode) { case CODE_SHOW_INPUT_METHOD_PICKER: - if (SubtypeUtils.hasMultipleEnabledIMEsOrSubtypes(true /* include aux subtypes */)) { + if (ImfUtils.hasMultipleEnabledIMEsOrSubtypes( + this, true /* include aux subtypes */)) { mImm.showInputMethodPicker(); return true; } @@ -1169,7 +1170,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen final IBinder token = getWindow().getWindow().getAttributes().token; if (mShouldSwitchToLastSubtype) { final InputMethodSubtype lastSubtype = mImm.getLastInputMethodSubtype(); - final boolean lastSubtypeBelongsToThisIme = SubtypeUtils.checkIfSubtypeBelongsToThisIme( + final boolean lastSubtypeBelongsToThisIme = ImfUtils.checkIfSubtypeBelongsToThisIme( this, lastSubtype); if ((includesOtherImes || lastSubtypeBelongsToThisIme) && mImm.switchToLastInputMethod(token)) { @@ -2299,6 +2300,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen getString(R.string.language_selection_title), getString(R.string.english_ime_settings), }; + final Context context = this; final DialogInterface.OnClickListener listener = new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface di, int position) { @@ -2306,7 +2308,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen switch (position) { case 0: Intent intent = CompatUtils.getInputLanguageSelectionIntent( - SubtypeUtils.getInputMethodId(getPackageName()), + ImfUtils.getInputMethodIdOfThisIme(context), Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED | Intent.FLAG_ACTIVITY_CLEAR_TOP); |