Delete unused code from IMMS and its utility library.
This CL changes nothing except for deleting unused code and
methods from InputMethodManagerService and InputMethodUtils.
No behavior change is expected.
Bug: 22285167
Change-Id: I3bd814c8b5892b4ef28d6d5622014463df8f1c2b
diff --git a/core/java/com/android/internal/inputmethod/InputMethodUtils.java b/core/java/com/android/internal/inputmethod/InputMethodUtils.java
index 78e5d38..d53efa0 100644
--- a/core/java/com/android/internal/inputmethod/InputMethodUtils.java
+++ b/core/java/com/android/internal/inputmethod/InputMethodUtils.java
@@ -878,12 +878,6 @@
getEnabledInputMethodsAndSubtypeListLocked());
}
- public List<Pair<InputMethodInfo, ArrayList<String>>>
- getEnabledInputMethodAndSubtypeHashCodeListLocked() {
- return createEnabledInputMethodAndSubtypeHashCodeListLocked(
- getEnabledInputMethodsAndSubtypeListLocked());
- }
-
public List<InputMethodSubtype> getEnabledInputMethodSubtypeListLocked(
Context context, InputMethodInfo imi, boolean allowsImplicitlySelectedSubtypes) {
List<InputMethodSubtype> enabledSubtypes =
@@ -998,19 +992,6 @@
return res;
}
- private List<Pair<InputMethodInfo, ArrayList<String>>>
- createEnabledInputMethodAndSubtypeHashCodeListLocked(
- List<Pair<String, ArrayList<String>>> imsList) {
- final ArrayList<Pair<InputMethodInfo, ArrayList<String>>> res = new ArrayList<>();
- for (Pair<String, ArrayList<String>> ims : imsList) {
- InputMethodInfo info = mMethodMap.get(ims.first);
- if (info != null) {
- res.add(new Pair<>(info, ims.second));
- }
- }
- return res;
- }
-
private void putEnabledInputMethodsStr(String str) {
Settings.Secure.putStringForUser(
mResolver, Settings.Secure.ENABLED_INPUT_METHODS, str, mCurrentUserId);
@@ -1225,11 +1206,6 @@
subtypeId, mCurrentUserId);
}
- public String getDisabledSystemInputMethods() {
- return Settings.Secure.getStringForUser(
- mResolver, Settings.Secure.DISABLED_SYSTEM_INPUT_METHODS, mCurrentUserId);
- }
-
public String getSelectedInputMethod() {
if (DEBUG) {
Slog.d(TAG, "getSelectedInputMethodStr: " + Settings.Secure.getStringForUser(
diff --git a/services/core/java/com/android/server/InputMethodManagerService.java b/services/core/java/com/android/server/InputMethodManagerService.java
index b443a28..e26b34d 100644
--- a/services/core/java/com/android/server/InputMethodManagerService.java
+++ b/services/core/java/com/android/server/InputMethodManagerService.java
@@ -2892,8 +2892,6 @@
// Use for queryIntentServicesAsUser
final PackageManager pm = mContext.getPackageManager();
- String disabledSysImes = mSettings.getDisabledSystemInputMethods();
- if (disabledSysImes == null) disabledSysImes = "";
final List<ResolveInfo> services = pm.queryIntentServicesAsUser(
new Intent(InputMethod.SERVICE_INTERFACE),
@@ -3461,17 +3459,6 @@
return mCurrentSubtype;
}
- private void addShortcutInputMethodAndSubtypes(InputMethodInfo imi,
- InputMethodSubtype subtype) {
- if (mShortcutInputMethodsAndSubtypes.containsKey(imi)) {
- mShortcutInputMethodsAndSubtypes.get(imi).add(subtype);
- } else {
- ArrayList<InputMethodSubtype> subtypes = new ArrayList<>();
- subtypes.add(subtype);
- mShortcutInputMethodsAndSubtypes.put(imi, subtypes);
- }
- }
-
// TODO: We should change the return type from List to List<Parcelable>
@SuppressWarnings("rawtypes")
@Override