Loading core/java/android/view/ImeFocusController.java +8 −0 Original line number Diff line number Diff line Loading @@ -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; } } core/java/android/view/View.java +1 −6 Original line number Diff line number Diff line Loading @@ -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(); } /** Loading Loading @@ -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. */ core/java/android/view/ViewRootImpl.java +1 −2 Original line number Diff line number Diff line Loading @@ -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) { Loading core/java/android/view/inputmethod/InputMethodManager.java +5 −0 Original line number Diff line number Diff line Loading @@ -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; } } Loading Loading
core/java/android/view/ImeFocusController.java +8 −0 Original line number Diff line number Diff line Loading @@ -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; } }
core/java/android/view/View.java +1 −6 Original line number Diff line number Diff line Loading @@ -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(); } /** Loading Loading @@ -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. */
core/java/android/view/ViewRootImpl.java +1 −2 Original line number Diff line number Diff line Loading @@ -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) { Loading
core/java/android/view/inputmethod/InputMethodManager.java +5 −0 Original line number Diff line number Diff line Loading @@ -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; } } Loading