Loading api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -29299,6 +29299,7 @@ package android.view.inputmethod { method public boolean setCurrentInputMethodSubtype(android.view.inputmethod.InputMethodSubtype); method public void setInputMethod(android.os.IBinder, java.lang.String); method public void setInputMethodAndSubtype(android.os.IBinder, java.lang.String, android.view.inputmethod.InputMethodSubtype); method public boolean shouldOfferSwitchingToNextInputMethod(android.os.IBinder); method public void showInputMethodAndSubtypeEnabler(java.lang.String); method public void showInputMethodPicker(); method public boolean showSoftInput(android.view.View, int); core/java/android/view/inputmethod/InputMethodManager.java +18 −0 Original line number Diff line number Diff line Loading @@ -1875,6 +1875,24 @@ public final class InputMethodManager { } } /** * Returns true if the current IME needs to offer the users a way to switch to a next input * method. When the user triggers it, the IME has to call {@link #switchToNextInputMethod} to * switch to a next input method which is selected by the system. * @param imeToken Supplies the identifying token given to an input method when it was started, * which allows it to perform this operation on itself. */ public boolean shouldOfferSwitchingToNextInputMethod(IBinder imeToken) { synchronized (mH) { try { return mService.shouldOfferSwitchingToNextInputMethod(imeToken); } catch (RemoteException e) { Log.w(TAG, "IME died: " + mCurId, e); return false; } } } /** * Set additional input method subtypes. Only a process which shares the same uid with the IME * can add additional input method subtypes to the IME. Loading core/java/com/android/internal/view/IInputMethodManager.aidl +2 −1 Original line number Diff line number Diff line Loading @@ -71,6 +71,7 @@ interface IInputMethodManager { boolean setCurrentInputMethodSubtype(in InputMethodSubtype subtype); boolean switchToLastInputMethod(in IBinder token); boolean switchToNextInputMethod(in IBinder token, boolean onlyCurrentIme); boolean shouldOfferSwitchingToNextInputMethod(in IBinder token); boolean setInputMethodEnabled(String id, boolean enabled); oneway void setAdditionalInputMethodSubtypes(String id, in InputMethodSubtype[] subtypes); } services/java/com/android/server/InputMethodManagerService.java +15 −0 Original line number Diff line number Diff line Loading @@ -2158,6 +2158,21 @@ public class InputMethodManagerService extends IInputMethodManager.Stub } } @Override public boolean shouldOfferSwitchingToNextInputMethod(IBinder token) { if (!calledFromValidUser()) { return false; } synchronized (mMethodMap) { final ImeSubtypeListItem nextSubtype = mImListManager.getNextInputMethod( false /* onlyCurrentIme */, mMethodMap.get(mCurMethodId), mCurrentSubtype); if (nextSubtype == null) { return false; } return true; } } @Override public InputMethodSubtype getLastInputMethodSubtype() { if (!calledFromValidUser()) { Loading Loading
api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -29299,6 +29299,7 @@ package android.view.inputmethod { method public boolean setCurrentInputMethodSubtype(android.view.inputmethod.InputMethodSubtype); method public void setInputMethod(android.os.IBinder, java.lang.String); method public void setInputMethodAndSubtype(android.os.IBinder, java.lang.String, android.view.inputmethod.InputMethodSubtype); method public boolean shouldOfferSwitchingToNextInputMethod(android.os.IBinder); method public void showInputMethodAndSubtypeEnabler(java.lang.String); method public void showInputMethodPicker(); method public boolean showSoftInput(android.view.View, int);
core/java/android/view/inputmethod/InputMethodManager.java +18 −0 Original line number Diff line number Diff line Loading @@ -1875,6 +1875,24 @@ public final class InputMethodManager { } } /** * Returns true if the current IME needs to offer the users a way to switch to a next input * method. When the user triggers it, the IME has to call {@link #switchToNextInputMethod} to * switch to a next input method which is selected by the system. * @param imeToken Supplies the identifying token given to an input method when it was started, * which allows it to perform this operation on itself. */ public boolean shouldOfferSwitchingToNextInputMethod(IBinder imeToken) { synchronized (mH) { try { return mService.shouldOfferSwitchingToNextInputMethod(imeToken); } catch (RemoteException e) { Log.w(TAG, "IME died: " + mCurId, e); return false; } } } /** * Set additional input method subtypes. Only a process which shares the same uid with the IME * can add additional input method subtypes to the IME. Loading
core/java/com/android/internal/view/IInputMethodManager.aidl +2 −1 Original line number Diff line number Diff line Loading @@ -71,6 +71,7 @@ interface IInputMethodManager { boolean setCurrentInputMethodSubtype(in InputMethodSubtype subtype); boolean switchToLastInputMethod(in IBinder token); boolean switchToNextInputMethod(in IBinder token, boolean onlyCurrentIme); boolean shouldOfferSwitchingToNextInputMethod(in IBinder token); boolean setInputMethodEnabled(String id, boolean enabled); oneway void setAdditionalInputMethodSubtypes(String id, in InputMethodSubtype[] subtypes); }
services/java/com/android/server/InputMethodManagerService.java +15 −0 Original line number Diff line number Diff line Loading @@ -2158,6 +2158,21 @@ public class InputMethodManagerService extends IInputMethodManager.Stub } } @Override public boolean shouldOfferSwitchingToNextInputMethod(IBinder token) { if (!calledFromValidUser()) { return false; } synchronized (mMethodMap) { final ImeSubtypeListItem nextSubtype = mImListManager.getNextInputMethod( false /* onlyCurrentIme */, mMethodMap.get(mCurMethodId), mCurrentSubtype); if (nextSubtype == null) { return false; } return true; } } @Override public InputMethodSubtype getLastInputMethodSubtype() { if (!calledFromValidUser()) { Loading