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

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

Merge "Fix Keyboard won't show up in some cases"

parents bbc78d5d 233164c9
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -253,4 +253,12 @@ public final class ImeFocusController {
    public void setNextServedView(View view) {
        mNextServedView = view;
    }

    /**
     * Indicates whether the view's window has IME focused.
     */
    @UiThread
    boolean hasImeFocus() {
        return mHasImeFocus;
    }
}
+1 −6
Original line number Diff line number Diff line
@@ -14470,7 +14470,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
     * @hide
     */
    public boolean hasImeFocus() {
        return mAttachInfo != null && mAttachInfo.mHasImeFocus;
        return getViewRootImpl() != null && getViewRootImpl().getImeFocusController().hasImeFocus();
    }
    /**
@@ -28724,11 +28724,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
        @UnsupportedAppUsage
        boolean mHasWindowFocus;
        /**
         * Indicates whether the view's window has IME focused.
         */
        boolean mHasImeFocus;
        /**
         * The current visibility of the window.
         */
+1 −2
Original line number Diff line number Diff line
@@ -3145,8 +3145,7 @@ public final class ViewRootImpl implements ViewParent,
            }

            mAttachInfo.mHasWindowFocus = hasWindowFocus;
            mAttachInfo.mHasImeFocus = mImeFocusController.updateImeFocusable(
                    mWindowAttributes, true /* force */);
            mImeFocusController.updateImeFocusable(mWindowAttributes, true /* force */);
            mImeFocusController.onPreWindowFocus(hasWindowFocus, mWindowAttributes);

            if (mView != null) {
+5 −0
Original line number Diff line number Diff line
@@ -671,6 +671,11 @@ public final class InputMethodManager {
                mWindowFocusGainFuture = null;
            }
            synchronized (mH) {
                if (mCurRootView != null) {
                    // Reset the last served view and restart window focus state of the root view.
                    mCurRootView.getImeFocusController().setServedView(null);
                    mRestartOnNextWindowFocus = true;
                }
                mCurRootView = rootView;
            }
        }