Loading api/current.xml +13 −0 Original line number Diff line number Diff line Loading @@ -219249,6 +219249,19 @@ <parameter name="data" type="android.os.Bundle"> </parameter> </method> <method name="setCurrentInputMethodSubtype" return="boolean" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="subtype" type="android.view.inputmethod.InputMethodSubtype"> </parameter> </method> <method name="setInputMethod" return="void" abstract="false" core/java/android/view/inputmethod/InputMethodManager.java +11 −0 Original line number Diff line number Diff line Loading @@ -1432,6 +1432,17 @@ public final class InputMethodManager { } } public boolean setCurrentInputMethodSubtype(InputMethodSubtype subtype) { synchronized (mH) { try { return mService.setCurrentInputMethodSubtype(subtype); } catch (RemoteException e) { Log.w(TAG, "IME died: " + mCurId, e); return false; } } } public boolean switchToLastInputMethod(IBinder imeToken) { synchronized (mH) { try { Loading core/java/com/android/internal/view/IInputMethodManager.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -57,7 +57,7 @@ interface IInputMethodManager { void updateStatusIcon(in IBinder token, String packageName, int iconId); void setIMEButtonVisible(in IBinder token, boolean visible); InputMethodSubtype getCurrentInputMethodSubtype(); boolean setCurrentInputMethodSubtype(in InputMethodSubtype subtype); boolean switchToLastInputMethod(in IBinder token); boolean setInputMethodEnabled(String id, boolean enabled); } services/java/com/android/server/InputMethodManagerService.java +17 −2 Original line number Diff line number Diff line Loading @@ -988,8 +988,9 @@ public class InputMethodManagerService extends IInputMethodManager.Stub } if (id.equals(mCurMethodId)) { if (subtypeId != NOT_A_SUBTYPE_ID) { InputMethodSubtype subtype = info.getSubtypes().get(subtypeId); ArrayList<InputMethodSubtype> subtypes = info.getSubtypes(); if (subtypeId >= 0 && subtypeId < subtypes.size()) { InputMethodSubtype subtype = subtypes.get(subtypeId); if (subtype != mCurrentSubtype) { synchronized (mMethodMap) { if (mCurMethod != null) { Loading Loading @@ -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. Loading Loading
api/current.xml +13 −0 Original line number Diff line number Diff line Loading @@ -219249,6 +219249,19 @@ <parameter name="data" type="android.os.Bundle"> </parameter> </method> <method name="setCurrentInputMethodSubtype" return="boolean" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="subtype" type="android.view.inputmethod.InputMethodSubtype"> </parameter> </method> <method name="setInputMethod" return="void" abstract="false"
core/java/android/view/inputmethod/InputMethodManager.java +11 −0 Original line number Diff line number Diff line Loading @@ -1432,6 +1432,17 @@ public final class InputMethodManager { } } public boolean setCurrentInputMethodSubtype(InputMethodSubtype subtype) { synchronized (mH) { try { return mService.setCurrentInputMethodSubtype(subtype); } catch (RemoteException e) { Log.w(TAG, "IME died: " + mCurId, e); return false; } } } public boolean switchToLastInputMethod(IBinder imeToken) { synchronized (mH) { try { Loading
core/java/com/android/internal/view/IInputMethodManager.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -57,7 +57,7 @@ interface IInputMethodManager { void updateStatusIcon(in IBinder token, String packageName, int iconId); void setIMEButtonVisible(in IBinder token, boolean visible); InputMethodSubtype getCurrentInputMethodSubtype(); boolean setCurrentInputMethodSubtype(in InputMethodSubtype subtype); boolean switchToLastInputMethod(in IBinder token); boolean setInputMethodEnabled(String id, boolean enabled); }
services/java/com/android/server/InputMethodManagerService.java +17 −2 Original line number Diff line number Diff line Loading @@ -988,8 +988,9 @@ public class InputMethodManagerService extends IInputMethodManager.Stub } if (id.equals(mCurMethodId)) { if (subtypeId != NOT_A_SUBTYPE_ID) { InputMethodSubtype subtype = info.getSubtypes().get(subtypeId); ArrayList<InputMethodSubtype> subtypes = info.getSubtypes(); if (subtypeId >= 0 && subtypeId < subtypes.size()) { InputMethodSubtype subtype = subtypes.get(subtypeId); if (subtype != mCurrentSubtype) { synchronized (mMethodMap) { if (mCurMethod != null) { Loading Loading @@ -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. Loading