aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/RichInputMethodManager.java
diff options
context:
space:
mode:
authorSatoshi Kataoka <satok@google.com>2013-05-09 15:53:31 +0900
committerSatoshi Kataoka <satok@google.com>2013-05-09 17:07:19 +0900
commitb902109000bcef184e69daac7dc3906fc969791e (patch)
treea870da50d74f4082beabbe1efdf148c2674e627f /java/src/com/android/inputmethod/latin/RichInputMethodManager.java
parent499cea949d57def583950a427631c4c4e3803134 (diff)
downloadlatinime-b902109000bcef184e69daac7dc3906fc969791e.tar.gz
latinime-b902109000bcef184e69daac7dc3906fc969791e.tar.xz
latinime-b902109000bcef184e69daac7dc3906fc969791e.zip
Fix usages of getEnabledInputMethodSubtypeList
Bug: 8450279 Change-Id: Ib8433442ae6ca6c28da2652bff687cdeaf7c196e
Diffstat (limited to 'java/src/com/android/inputmethod/latin/RichInputMethodManager.java')
-rw-r--r--java/src/com/android/inputmethod/latin/RichInputMethodManager.java17
1 files changed, 11 insertions, 6 deletions
diff --git a/java/src/com/android/inputmethod/latin/RichInputMethodManager.java b/java/src/com/android/inputmethod/latin/RichInputMethodManager.java
index 3f7be99e5..94513e635 100644
--- a/java/src/com/android/inputmethod/latin/RichInputMethodManager.java
+++ b/java/src/com/android/inputmethod/latin/RichInputMethodManager.java
@@ -100,6 +100,12 @@ public final class RichInputMethodManager {
throw new RuntimeException("Input method id for " + packageName + " not found.");
}
+ public List<InputMethodSubtype> getMyEnabledInputMethodSubtypeList(
+ boolean allowsImplicitlySelectedSubtypes) {
+ return mImmWrapper.mImm.getEnabledInputMethodSubtypeList(
+ mInputMethodInfoOfThisIme, allowsImplicitlySelectedSubtypes);
+ }
+
public boolean switchToNextInputMethod(final IBinder token, final boolean onlyCurrentIme) {
if (mImmWrapper.switchToNextInputMethod(token, onlyCurrentIme)) {
return true;
@@ -116,8 +122,8 @@ public final class RichInputMethodManager {
final boolean onlyCurrentIme) {
final InputMethodManager imm = mImmWrapper.mImm;
final InputMethodSubtype currentSubtype = imm.getCurrentInputMethodSubtype();
- final List<InputMethodSubtype> enabledSubtypes = imm.getEnabledInputMethodSubtypeList(
- mInputMethodInfoOfThisIme, true /* allowsImplicitlySelectedSubtypes */);
+ final List<InputMethodSubtype> enabledSubtypes = getMyEnabledInputMethodSubtypeList(
+ true /* allowsImplicitlySelectedSubtypes */);
final int currentIndex = getSubtypeIndexInList(currentSubtype, enabledSubtypes);
if (currentIndex == INDEX_NOT_FOUND) {
Log.w(TAG, "Can't find current subtype in enabled subtypes: subtype="
@@ -214,8 +220,8 @@ public final class RichInputMethodManager {
final InputMethodSubtype subtype) {
final boolean subtypeEnabled = checkIfSubtypeBelongsToThisImeAndEnabled(subtype);
final boolean subtypeExplicitlyEnabled = checkIfSubtypeBelongsToList(
- subtype, mImmWrapper.mImm.getEnabledInputMethodSubtypeList(
- mInputMethodInfoOfThisIme, false /* allowsImplicitlySelectedSubtypes */));
+ subtype, getMyEnabledInputMethodSubtypeList(
+ false /* allowsImplicitlySelectedSubtypes */));
return subtypeEnabled && !subtypeExplicitlyEnabled;
}
@@ -312,8 +318,7 @@ public final class RichInputMethodManager {
if (filteredImisCount > 1) {
return true;
}
- final List<InputMethodSubtype> subtypes =
- mImmWrapper.mImm.getEnabledInputMethodSubtypeList(null, true);
+ final List<InputMethodSubtype> subtypes = getMyEnabledInputMethodSubtypeList(true);
int keyboardCount = 0;
// imm.getEnabledInputMethodSubtypeList(null, true) will return the current IME's
// both explicitly and implicitly enabled input method subtype.