void focusInLocked(View view) { if (DEBUG) Log.v(TAG, "focusIn: " + view); if (mCurRootView != view.getRootView()) { // This is a request from a window that isn't in the window with // IME focus, so ignore it. if (DEBUG) Log.v(TAG, "Not IME target window, ignoring"); return; } mNextServedView = view; scheduleCheckFocusLocked(view); }
/** * Call this when a view loses focus. * * @hide */ public void focusOut(View view) { synchronized (mH) { if (DEBUG) Log.v( TAG, "focusOut: " + view + " mServedView=" + mServedView + " winFocus=" + 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); } } } }