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

Commit 0e5bf505 authored by satok's avatar satok Committed by Android (Google) Code Review
Browse files

Merge "Show ime switch icon when there is a hard keyboard" into honeycomb

parents cdd5626d 865b9776
Loading
Loading
Loading
Loading
+11 −3
Original line number Diff line number Diff line
@@ -393,6 +393,10 @@ public class InputMethodService extends AbstractInputMethodService {
            if (onShowInputRequested(flags, false)) {
                showWindow(true);
            }
            // If user uses hard keyboard, IME button should always be shown.
            if (!onEvaluateInputViewShown()) {
                mImm.setIMEButtonVisible(mToken, true);
            }
            if (resultReceiver != null) {
                resultReceiver.send(wasVis != isInputViewShown()
                        ? InputMethodManager.RESULT_SHOWN
@@ -699,6 +703,10 @@ public class InputMethodService extends AbstractInputMethodService {
                // Otherwise hide the window.
                hideWindow();
            }
            // If user uses hard keyboard, IME button should always be shown.
            if (!onEvaluateInputViewShown()) {
                mImm.setIMEButtonVisible(mToken, true);
            }
        }
    }

@@ -1386,10 +1394,10 @@ public class InputMethodService extends AbstractInputMethodService {
        }
        mInputViewStarted = false;
        mCandidatesViewStarted = false;
        mImm.setIMEButtonVisible(mToken, false);
        if (mWindowVisible) {
            mWindow.hide();
            mWindowVisible = false;
            mImm.setIMEButtonVisible(mToken, false);
            onWindowHidden();
            mWindowWasVisible = false;
        }
+2 −0
Original line number Diff line number Diff line
@@ -1148,9 +1148,11 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
                        if (!mIWindowManager.inputMethodClientHasFocus(client)) {
                            if (DEBUG) Slog.w(TAG, "Ignoring hideSoftInput of uid "
                                    + uid + ": " + client);
                            mStatusBar.setIMEButtonVisible(mCurToken, false);
                            return false;
                        }
                    } catch (RemoteException e) {
                        mStatusBar.setIMEButtonVisible(mCurToken, false);
                        return false;
                    }
                }