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

Commit e6af411b authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Deprecate InputMethodManager#setCurrentInputMethodSubtype()"

parents f36350ac ff42b1b6
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -53010,7 +53010,7 @@ package android.view.inputmethod {
    method public void restartInput(android.view.View);
    method public void restartInput(android.view.View);
    method public void sendAppPrivateCommand(android.view.View, String, android.os.Bundle);
    method public void sendAppPrivateCommand(android.view.View, String, android.os.Bundle);
    method @Deprecated 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 @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 setInputMethod(android.os.IBinder, String);
    method @Deprecated public void setInputMethodAndSubtype(@NonNull android.os.IBinder, String, android.view.inputmethod.InputMethodSubtype);
    method @Deprecated public void setInputMethodAndSubtype(@NonNull android.os.IBinder, String, android.view.inputmethod.InputMethodSubtype);
    method @Deprecated public boolean shouldOfferSwitchingToNextInputMethod(android.os.IBinder);
    method @Deprecated public boolean shouldOfferSwitchingToNextInputMethod(android.os.IBinder);
+7 −0
Original line number Original line Diff line number Diff line
@@ -2490,7 +2490,14 @@ public final class InputMethodManager {
     * @param subtype A new input method subtype to switch.
     * @param subtype A new input method subtype to switch.
     * @return true if the current subtype was successfully switched. When the specified subtype is
     * @return true if the current subtype was successfully switched. When the specified subtype is
     * null, this method returns false.
     * null, this method returns false.
     * @deprecated If the calling process is an IME, use
     *             {@link InputMethodService#switchInputMethod(String, InputMethodSubtype)}, which
     *             does not require any permission as long as the caller is the current IME.
     *             If the calling process is some privileged app that already has
     *             {@link android.Manifest.permission#WRITE_SECURE_SETTINGS} permission, just
     *             directly update {@link Settings.Secure#SELECTED_INPUT_METHOD_SUBTYPE}.
     */
     */
    @Deprecated
    @RequiresPermission(WRITE_SECURE_SETTINGS)
    @RequiresPermission(WRITE_SECURE_SETTINGS)
    public boolean setCurrentInputMethodSubtype(InputMethodSubtype subtype) {
    public boolean setCurrentInputMethodSubtype(InputMethodSubtype subtype) {
        if (Process.myUid() == Process.SYSTEM_UID) {
        if (Process.myUid() == Process.SYSTEM_UID) {