Add sort method to InputMethodSubtype

Bug: 3364167

Change-Id: I94ad55b8eab49dc9b233dcb4e74429863b406fb4
This commit is contained in:
satok
2011-02-14 15:47:30 +09:00
parent f3032e9d9d
commit 7265d9bd6d
2 changed files with 39 additions and 5 deletions

View File

@ -596,13 +596,12 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
if (imi == null && mCurMethodId != null) {
imi = mMethodMap.get(mCurMethodId);
}
final List<InputMethodSubtype> enabledSubtypes =
List<InputMethodSubtype> enabledSubtypes =
mSettings.getEnabledInputMethodSubtypeListLocked(imi);
if (!allowsImplicitlySelectedSubtypes || enabledSubtypes.size() > 0) {
return enabledSubtypes;
} else {
return getApplicableSubtypesLocked(mRes, getSubtypes(imi));
if (allowsImplicitlySelectedSubtypes && enabledSubtypes.isEmpty()) {
enabledSubtypes = getApplicableSubtypesLocked(mRes, getSubtypes(imi));
}
return InputMethodSubtype.sort(mContext, 0, imi, enabledSubtypes);
}
public List<InputMethodSubtype> getEnabledInputMethodSubtypeList(InputMethodInfo imi,