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

Commit 24ceab6c authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Rename IMMI#hideAllInputMethods to #hideInputMethod" into main

parents 5ac5865f 233680ab
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -75,13 +75,13 @@ public abstract class InputMethodManagerInternal {
    public abstract void setInteractive(boolean interactive);

    /**
     * Hides the input methods for all the users, if visible.
     * Hides the input method for the specified {@code originatingDisplayId}, if visible.
     *
     * @param reason               the reason for hiding the current input method
     * @param originatingDisplayId the display ID the request is originated
     */
    @ImfLockFree
    public abstract void hideAllInputMethods(@SoftInputShowHideReason int reason,
    public abstract void hideInputMethod(@SoftInputShowHideReason int reason,
            int originatingDisplayId);

    /**
@@ -315,7 +315,7 @@ public abstract class InputMethodManagerInternal {

                @ImfLockFree
                @Override
                public void hideAllInputMethods(@SoftInputShowHideReason int reason,
                public void hideInputMethod(@SoftInputShowHideReason int reason,
                        int originatingDisplayId) {
                }

+5 −5
Original line number Diff line number Diff line
@@ -254,7 +254,7 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
    private @interface MultiUserUnawareField {
    }

    private static final int MSG_HIDE_ALL_INPUT_METHODS = 1035;
    private static final int MSG_HIDE_INPUT_METHOD = 1035;
    private static final int MSG_REMOVE_IME_SURFACE = 1060;
    private static final int MSG_REMOVE_IME_SURFACE_FROM_WINDOW = 1061;

@@ -5064,7 +5064,7 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
    @Override
    public boolean handleMessage(Message msg) {
        switch (msg.what) {
            case MSG_HIDE_ALL_INPUT_METHODS: {
            case MSG_HIDE_INPUT_METHOD: {
                @SoftInputShowHideReason final int reason = msg.arg1;
                final int originatingDisplayId = msg.arg2;
                synchronized (ImfLock.class) {
@@ -5800,10 +5800,10 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.

        @ImfLockFree
        @Override
        public void hideAllInputMethods(@SoftInputShowHideReason int reason,
        public void hideInputMethod(@SoftInputShowHideReason int reason,
                int originatingDisplayId) {
            mHandler.removeMessages(MSG_HIDE_ALL_INPUT_METHODS);
            mHandler.obtainMessage(MSG_HIDE_ALL_INPUT_METHODS, reason, originatingDisplayId)
            mHandler.removeMessages(MSG_HIDE_INPUT_METHOD);
            mHandler.obtainMessage(MSG_HIDE_INPUT_METHOD, reason, originatingDisplayId)
                    .sendToTarget();
        }

+1 −2
Original line number Diff line number Diff line
@@ -1158,8 +1158,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
                    break;
                case SHORT_PRESS_POWER_CLOSE_IME_OR_GO_HOME: {
                    if (mDismissImeOnBackKeyPressed) {
                        // TODO(b/308479256): Check if hiding "all" IMEs is OK or not.
                        InputMethodManagerInternal.get().hideAllInputMethods(
                        InputMethodManagerInternal.get().hideInputMethod(
                                SoftInputShowHideReason.HIDE_POWER_BUTTON_GO_HOME, displayId);
                    } else {
                        shortPressPowerGoHome();
+1 −2
Original line number Diff line number Diff line
@@ -1890,8 +1890,7 @@ public class StatusBarManagerService extends IStatusBarService.Stub implements D
        enforceStatusBarService();
        final long token = Binder.clearCallingIdentity();
        try {
            // TODO(b/308479256): Check if hiding "all" IMEs is OK or not.
            InputMethodManagerInternal.get().hideAllInputMethods(
            InputMethodManagerInternal.get().hideInputMethod(
                    SoftInputShowHideReason.HIDE_BUBBLES, displayId);
        } finally {
            Binder.restoreCallingIdentity(token);
+1 −2
Original line number Diff line number Diff line
@@ -439,8 +439,7 @@ final class InputMonitor {
                        final InputMethodManagerInternal inputMethodManagerInternal =
                                LocalServices.getService(InputMethodManagerInternal.class);
                        if (inputMethodManagerInternal != null) {
                            // TODO(b/308479256): Check if hiding "all" IMEs is OK or not.
                            inputMethodManagerInternal.hideAllInputMethods(
                            inputMethodManagerInternal.hideInputMethod(
                                    SoftInputShowHideReason.HIDE_RECENTS_ANIMATION,
                                    mDisplayContent.getDisplayId());
                        }