diff options
| author | satok <satok@google.com> | 2011-02-14 18:03:32 +0900 |
|---|---|---|
| committer | satok <satok@google.com> | 2011-02-15 17:53:58 +0900 |
| commit | 9c4cc03a354922df08efacfc486ef0e80144d3ea (patch) | |
| tree | 1bbef23fd93b59192eca31393a6e329a3e4e6e0f /services/java/com/android/server/InputMethodManagerService.java | |
| parent | 0554f32afd5309344b8d0ddcebd5ff7bc6ae3410 (diff) | |
Add a method to check a string contained in ExtraValue of InputMethodSubtype
Change-Id: I34390537eaacd3ff8cfd336eaf5b9ca0d3e4b802
Diffstat (limited to 'services/java/com/android/server/InputMethodManagerService.java')
| -rw-r--r-- | services/java/com/android/server/InputMethodManagerService.java | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/services/java/com/android/server/InputMethodManagerService.java b/services/java/com/android/server/InputMethodManagerService.java index d25b9c8148db..ba0f31b92250 100644 --- a/services/java/com/android/server/InputMethodManagerService.java +++ b/services/java/com/android/server/InputMethodManagerService.java @@ -1949,14 +1949,7 @@ public class InputMethodManagerService extends IInputMethodManager.Stub private boolean canAddToLastInputMethod(InputMethodSubtype subtype) { if (subtype == null) return true; - String[] extraValues = subtype.getExtraValue().split(","); - final int N = extraValues.length; - for (int i = 0; i < N; ++i) { - if (SUBTYPE_EXTRAVALUE_EXCLUDE_FROM_LAST_IME.equals(extraValues[i])) { - return false; - } - } - return true; + return subtype.containsExtraValueKey(SUBTYPE_EXTRAVALUE_EXCLUDE_FROM_LAST_IME); } private void saveCurrentInputMethodAndSubtypeToHistory() { |
