Loading core/java/android/view/ViewRootImpl.java +9 −3 Original line number Diff line number Diff line Loading @@ -3372,9 +3372,9 @@ public final class ViewRootImpl implements ViewParent, } // TODO (b/131181940): Make sure this doesn't leak Activity with mActivityConfigCallback // config changes. final View focusedView = mView != null ? mView.findFocus() : null; if (hasWindowFocus) { mInsetsController.onWindowFocusGained(focusedView != null /* hasViewFocused */); mInsetsController.onWindowFocusGained( getFocusedViewOrNull() != null /* hasViewFocused */); } else { mInsetsController.onWindowFocusLost(); } Loading Loading @@ -3423,7 +3423,8 @@ public final class ViewRootImpl implements ViewParent, // Note: must be done after the focus change callbacks, // so all of the view state is set up correctly. mImeFocusController.onPostWindowFocus(focusedView, hasWindowFocus, mWindowAttributes); mImeFocusController.onPostWindowFocus( getFocusedViewOrNull(), hasWindowFocus, mWindowAttributes); if (hasWindowFocus) { // Clear the forward bit. We can just do this directly, since Loading Loading @@ -6392,6 +6393,11 @@ public final class ViewRootImpl implements ViewParent, mView.dispatchTooltipHoverEvent(event); } @Nullable private View getFocusedViewOrNull() { return mView != null ? mView.findFocus() : null; } /** * Performs synthesis of new input events from unhandled input events. */ Loading Loading
core/java/android/view/ViewRootImpl.java +9 −3 Original line number Diff line number Diff line Loading @@ -3372,9 +3372,9 @@ public final class ViewRootImpl implements ViewParent, } // TODO (b/131181940): Make sure this doesn't leak Activity with mActivityConfigCallback // config changes. final View focusedView = mView != null ? mView.findFocus() : null; if (hasWindowFocus) { mInsetsController.onWindowFocusGained(focusedView != null /* hasViewFocused */); mInsetsController.onWindowFocusGained( getFocusedViewOrNull() != null /* hasViewFocused */); } else { mInsetsController.onWindowFocusLost(); } Loading Loading @@ -3423,7 +3423,8 @@ public final class ViewRootImpl implements ViewParent, // Note: must be done after the focus change callbacks, // so all of the view state is set up correctly. mImeFocusController.onPostWindowFocus(focusedView, hasWindowFocus, mWindowAttributes); mImeFocusController.onPostWindowFocus( getFocusedViewOrNull(), hasWindowFocus, mWindowAttributes); if (hasWindowFocus) { // Clear the forward bit. We can just do this directly, since Loading Loading @@ -6392,6 +6393,11 @@ public final class ViewRootImpl implements ViewParent, mView.dispatchTooltipHoverEvent(event); } @Nullable private View getFocusedViewOrNull() { return mView != null ? mView.findFocus() : null; } /** * Performs synthesis of new input events from unhandled input events. */ Loading