summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author satok <satok@google.com> 2011-08-31 18:03:21 +0900
committer satok <satok@google.com> 2011-08-31 18:03:21 +0900
commited2b24ecc7842b27178fc584a9e5bd5b1ab07635 (patch)
tree08ad0fd3c0e50c44bdf3926208885a62d4688226
parent8da2a004b883dc4526bddb3198476414b2f3819c (diff)
Fix set additional subtypes.
Bug: 5102787 Change-Id: Ic38db8c33b6496a083e8158cd79fb54c21187b04
-rw-r--r--services/java/com/android/server/InputMethodManagerService.java8
1 files changed, 1 insertions, 7 deletions
diff --git a/services/java/com/android/server/InputMethodManagerService.java b/services/java/com/android/server/InputMethodManagerService.java
index 38bcebc15053..ba2438beafbd 100644
--- a/services/java/com/android/server/InputMethodManagerService.java
+++ b/services/java/com/android/server/InputMethodManagerService.java
@@ -3065,17 +3065,11 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
public void addInputMethodSubtypes(
InputMethodInfo imi, InputMethodSubtype[] additionalSubtypes) {
synchronized (mMethodMap) {
- final HashSet<InputMethodSubtype> existingSubtypes =
- new HashSet<InputMethodSubtype>();
- for (int i = 0; i < imi.getSubtypeCount(); ++i) {
- existingSubtypes.add(imi.getSubtypeAt(i));
- }
-
final ArrayList<InputMethodSubtype> subtypes = new ArrayList<InputMethodSubtype>();
final int N = additionalSubtypes.length;
for (int i = 0; i < N; ++i) {
final InputMethodSubtype subtype = additionalSubtypes[i];
- if (!subtypes.contains(subtype) && !existingSubtypes.contains(subtype)) {
+ if (!subtypes.contains(subtype)) {
subtypes.add(subtype);
}
}