Loading core/java/android/view/inputmethod/InputMethodManager.java +22 −11 Original line number Diff line number Diff line Loading @@ -355,9 +355,11 @@ public final class InputMethodManager { if (mServedView != null && mServedView.isFocused()) { mServedConnecting = true; } } if (mActive) { startInputInner(); } } } return; } case MSG_SET_ACTIVE: { Loading Loading @@ -1135,15 +1137,21 @@ public final class InputMethodManager { * @hide */ public void checkFocus() { if (checkFocusNoStartInput()) { startInputInner(); } } private boolean checkFocusNoStartInput() { // This is called a lot, so short-circuit before locking. if (mServedView == mNextServedView && !mNextServedNeedsStart) { return; return false; } InputConnection ic = null; synchronized (mH) { if (mServedView == mNextServedView && !mNextServedNeedsStart) { return; return false; } if (DEBUG) Log.v(TAG, "checkFocus: view=" + mServedView + " next=" + mNextServedView Loading @@ -1156,7 +1164,7 @@ public final class InputMethodManager { // but no longer do. We should make sure the input method is // no longer shown, since it serves no purpose. closeCurrentInput(); return; return false; } ic = mServedInputConnection; Loading @@ -1171,7 +1179,7 @@ public final class InputMethodManager { ic.finishComposingText(); } startInputInner(); return true; } void closeCurrentInput() { Loading Loading @@ -1200,7 +1208,7 @@ public final class InputMethodManager { focusInLocked(focusedView != null ? focusedView : rootView); } checkFocus(); boolean startInput = checkFocusNoStartInput(); synchronized (mH) { try { Loading @@ -1209,6 +1217,9 @@ public final class InputMethodManager { mService.windowGainedFocus(mClient, rootView.getWindowToken(), focusedView != null, isTextEditor, softInputMode, first, windowFlags); if (startInput) { startInputInner(); } } catch (RemoteException e) { } } Loading Loading
core/java/android/view/inputmethod/InputMethodManager.java +22 −11 Original line number Diff line number Diff line Loading @@ -355,9 +355,11 @@ public final class InputMethodManager { if (mServedView != null && mServedView.isFocused()) { mServedConnecting = true; } } if (mActive) { startInputInner(); } } } return; } case MSG_SET_ACTIVE: { Loading Loading @@ -1135,15 +1137,21 @@ public final class InputMethodManager { * @hide */ public void checkFocus() { if (checkFocusNoStartInput()) { startInputInner(); } } private boolean checkFocusNoStartInput() { // This is called a lot, so short-circuit before locking. if (mServedView == mNextServedView && !mNextServedNeedsStart) { return; return false; } InputConnection ic = null; synchronized (mH) { if (mServedView == mNextServedView && !mNextServedNeedsStart) { return; return false; } if (DEBUG) Log.v(TAG, "checkFocus: view=" + mServedView + " next=" + mNextServedView Loading @@ -1156,7 +1164,7 @@ public final class InputMethodManager { // but no longer do. We should make sure the input method is // no longer shown, since it serves no purpose. closeCurrentInput(); return; return false; } ic = mServedInputConnection; Loading @@ -1171,7 +1179,7 @@ public final class InputMethodManager { ic.finishComposingText(); } startInputInner(); return true; } void closeCurrentInput() { Loading Loading @@ -1200,7 +1208,7 @@ public final class InputMethodManager { focusInLocked(focusedView != null ? focusedView : rootView); } checkFocus(); boolean startInput = checkFocusNoStartInput(); synchronized (mH) { try { Loading @@ -1209,6 +1217,9 @@ public final class InputMethodManager { mService.windowGainedFocus(mClient, rootView.getWindowToken(), focusedView != null, isTextEditor, softInputMode, first, windowFlags); if (startInput) { startInputInner(); } } catch (RemoteException e) { } } Loading