diff --git a/api/current.xml b/api/current.xml
index ba168becaddcd..15224cef3f028 100644
--- a/api/current.xml
+++ b/api/current.xml
@@ -219249,6 +219249,19 @@
+
+
+
+
subtypes = info.getSubtypes();
+ if (subtypeId >= 0 && subtypeId < subtypes.size()) {
+ InputMethodSubtype subtype = subtypes.get(subtypeId);
if (subtype != mCurrentSubtype) {
synchronized (mMethodMap) {
if (mCurMethod != null) {
@@ -1964,6 +1965,20 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
return mCurrentSubtype;
}
+ public boolean setCurrentInputMethodSubtype(InputMethodSubtype subtype) {
+ synchronized (mMethodMap) {
+ if (subtype != null && mCurMethodId != null) {
+ InputMethodInfo imi = mMethodMap.get(mCurMethodId);
+ int subtypeId = getSubtypeIdFromHashCode(imi, subtype.hashCode());
+ if (subtypeId != NOT_A_SUBTYPE_ID) {
+ setInputMethodLocked(mCurMethodId, subtypeId);
+ return true;
+ }
+ }
+ return false;
+ }
+ }
+
/**
* Utility class for putting and getting settings for InputMethod
* TODO: Move all putters and getters of settings to this class.