Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 92c15b1b authored by Yohei Yukawa's avatar Yohei Yukawa
Browse files

Deprecate InputMethodManager#setAdditionalInputMethodSubtypes()

This CL marks InputMethodManager#setAdditionalInputMethodSubtypes()
deprecated.  There is no actual implementation change at this moment,
but developers should be informed that this API may stop working in a
future version of Android.  IME developers should start migration
right now.

Since this feature was implemented in Android 4.0 ICS [1], there have
been many tricky bugs and documented/undocumented pitfalls.  For IMEs
that have already implemented features like customizable/downloadable
keyboard layouts/languages, most likely re-implementing IMEs' own
language switching mechanism then exposing only one unified IME
subtype to the system would be a better long term choice.

 [1]: Ic7869cfaa5361531e08d58d7dfa5ba0feab0613e
      ee5e77ca

Fix: 121220151
Test: make -j checkbuild
Change-Id: I781abde2d6d97b8420b29b80e14b9cce97482754
parent 065aac1a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -52905,7 +52905,7 @@ package android.view.inputmethod {
    method @Deprecated public boolean isWatchingCursor(android.view.View);
    method public void restartInput(android.view.View);
    method public void sendAppPrivateCommand(android.view.View, String, android.os.Bundle);
    method public void setAdditionalInputMethodSubtypes(String, android.view.inputmethod.InputMethodSubtype[]);
    method @Deprecated public void setAdditionalInputMethodSubtypes(String, android.view.inputmethod.InputMethodSubtype[]);
    method @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) public boolean setCurrentInputMethodSubtype(android.view.inputmethod.InputMethodSubtype);
    method @Deprecated public void setInputMethod(android.os.IBinder, String);
    method @Deprecated public void setInputMethodAndSubtype(@NonNull android.os.IBinder, String, android.view.inputmethod.InputMethodSubtype);
+6 −0
Original line number Diff line number Diff line
@@ -2642,7 +2642,13 @@ public final class InputMethodManager {
     *
     * @param imiId Id of InputMethodInfo which additional input method subtypes will be added to.
     * @param subtypes subtypes will be added as additional subtypes of the current input method.
     * @deprecated For IMEs that have already implemented features like customizable/downloadable
     *             keyboard layouts/languages, please start migration to other approaches. One idea
     *             would be exposing only one unified {@link InputMethodSubtype} then implement
     *             IME's own language switching mechanism within that unified subtype. The support
     *             of "Additional Subtype" may be completely dropped in a future version of Android.
     */
    @Deprecated
    public void setAdditionalInputMethodSubtypes(String imiId, InputMethodSubtype[] subtypes) {
        try {
            mService.setAdditionalInputMethodSubtypes(imiId, subtypes);