Loading core/java/android/view/inputmethod/InputMethodManager.java +1 −1 Original line number Diff line number Diff line Loading @@ -897,7 +897,7 @@ public final class InputMethodManager { return mServedInputConnection != null && mServedInputConnection.isActive() && mServedInputConnection.getServedView() == view; && mServedInputConnection.isAssociatedWith(view); } } Loading core/java/android/view/inputmethod/RemoteInputConnectionImpl.java +17 −1 Original line number Diff line number Diff line Loading @@ -218,10 +218,26 @@ final class RemoteInputConnectionImpl extends IRemoteInputConnection.Stub { return mParentInputMethodManager.isActive() && !isFinished(); } public View getServedView() { private View getServedView() { return mServedView.get(); } /** * Queries if the given {@link View} is associated with this {@link RemoteInputConnectionImpl} * or not. * * @param view {@link View}. * @return {@code true} if the given {@link View} is not null and is associated with this * {@link RemoteInputConnectionImpl}. */ @AnyThread public boolean isAssociatedWith(@Nullable View view) { if (view == null) { return false; } return mServedView.refersTo(view); } /** * Gets and resets {@link #mHasPendingImmediateCursorAnchorInfoUpdate}. * Loading Loading
core/java/android/view/inputmethod/InputMethodManager.java +1 −1 Original line number Diff line number Diff line Loading @@ -897,7 +897,7 @@ public final class InputMethodManager { return mServedInputConnection != null && mServedInputConnection.isActive() && mServedInputConnection.getServedView() == view; && mServedInputConnection.isAssociatedWith(view); } } Loading
core/java/android/view/inputmethod/RemoteInputConnectionImpl.java +17 −1 Original line number Diff line number Diff line Loading @@ -218,10 +218,26 @@ final class RemoteInputConnectionImpl extends IRemoteInputConnection.Stub { return mParentInputMethodManager.isActive() && !isFinished(); } public View getServedView() { private View getServedView() { return mServedView.get(); } /** * Queries if the given {@link View} is associated with this {@link RemoteInputConnectionImpl} * or not. * * @param view {@link View}. * @return {@code true} if the given {@link View} is not null and is associated with this * {@link RemoteInputConnectionImpl}. */ @AnyThread public boolean isAssociatedWith(@Nullable View view) { if (view == null) { return false; } return mServedView.refersTo(view); } /** * Gets and resets {@link #mHasPendingImmediateCursorAnchorInfoUpdate}. * Loading