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

Commit a6c4c80c authored by Yohei Yukawa's avatar Yohei Yukawa Committed by Android Git Automerger
Browse files

am 1d95daf3: am 4ad0161a: am 650a9135: Merge "Revert "Rely on IMM#focusOut()...

am 1d95daf3: am 4ad0161a: am 650a9135: Merge "Revert "Rely on IMM#focusOut() to close input session."" into mnc-dev

* commit '1d95daf3':
  Revert "Rely on IMM#focusOut() to close input session."
parents 626e3fa1 1d95daf3
Loading
Loading
Loading
Loading
+10 −6
Original line number Diff line number Diff line
@@ -1306,15 +1306,19 @@ public final class InputMethodManager {
            if (DEBUG) Log.v(TAG, "focusOut: " + view
                    + " mServedView=" + mServedView
                    + " winFocus=" + view.hasWindowFocus());
            // CAVEAT: We have ignored focusOut event in Android L MR-1 and prior.  Need special
            // care when changing the logic here because there are so many cases to be taken into
            // consideration, e.g., WindowManager.LayoutParams.SOFT_INPUT_* flags.
            if (mServedView == view && view.hasWindowFocus()) {
            if (mServedView != view) {
                // The following code would auto-hide the IME if we end up
                // with no more views with focus.  This can happen, however,
                // whenever we go into touch mode, so it ends up hiding
                // at times when we don't really want it to.  For now it
                // seems better to just turn it all off.
                if (false && view.hasWindowFocus()) {
                    mNextServedView = null;
                    scheduleCheckFocusLocked(view);
                }
            }
        }
    }

    static void scheduleCheckFocusLocked(View view) {
        ViewRootImpl viewRootImpl = view.getViewRootImpl();