Add a method to check a string contained in ExtraValue of InputMethodSubtype

Change-Id: I34390537eaacd3ff8cfd336eaf5b9ca0d3e4b802
This commit is contained in:
satok
2011-02-14 18:03:32 +09:00
parent 0554f32afd
commit 9c4cc03a35
3 changed files with 74 additions and 8 deletions

View File

@ -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() {