diff --git a/core/java/android/view/inputmethod/InputMethodManager.java b/core/java/android/view/inputmethod/InputMethodManager.java index 0c03d109f649b..a01decca52240 100644 --- a/core/java/android/view/inputmethod/InputMethodManager.java +++ b/core/java/android/view/inputmethod/InputMethodManager.java @@ -18,7 +18,6 @@ package android.view.inputmethod; import static android.Manifest.permission.INTERACT_ACROSS_USERS_FULL; import static android.Manifest.permission.WRITE_SECURE_SETTINGS; -import static android.view.inputmethod.InputConnection.CURSOR_UPDATE_FILTER_EDITOR_BOUNDS; import static android.view.inputmethod.InputConnection.CURSOR_UPDATE_IMMEDIATE; import static android.view.inputmethod.InputConnection.CURSOR_UPDATE_MONITOR; import static android.view.inputmethod.InputMethodEditorTraceProto.InputMethodClientsTraceProto.ClientSideProto.DISPLAY_ID; @@ -2086,15 +2085,6 @@ public final class InputMethodManager { Log.w(TAG, "Ignoring startStylusHandwriting: View's window does not have focus."); return; } - if (mServedInputConnection != null && getDelegate().hasActiveConnection(view)) { - // TODO (b/210039666): optimize CURSOR_UPDATE_IMMEDIATE. - // TODO (b/210039666): Pipe IME displayId from InputBindResult and use it here. - // instead of mDisplayId. - mServedInputConnection.requestCursorUpdatesFromImm( - CURSOR_UPDATE_IMMEDIATE | CURSOR_UPDATE_MONITOR, - CURSOR_UPDATE_FILTER_EDITOR_BOUNDS, - mDisplayId); - } mServiceInvoker.startStylusHandwriting(mClient); // TODO(b/210039666): do we need any extra work for supporting non-native diff --git a/core/java/com/android/internal/inputmethod/RemoteInputConnectionImpl.java b/core/java/com/android/internal/inputmethod/RemoteInputConnectionImpl.java index 2bef10f1aee57..b63ce1b22cdbb 100644 --- a/core/java/com/android/internal/inputmethod/RemoteInputConnectionImpl.java +++ b/core/java/com/android/internal/inputmethod/RemoteInputConnectionImpl.java @@ -968,27 +968,6 @@ public final class RemoteInputConnectionImpl extends IRemoteInputConnection.Stub }); } - /** - * Dispatches {@link InputConnection#requestCursorUpdates(int)}. - * - *
This method is intended to be called only from {@link InputMethodManager}.
- * @param cursorUpdateMode the mode for {@link InputConnection#requestCursorUpdates(int, int)} - * @param cursorUpdateFilter the filter for - * {@link InputConnection#requestCursorUpdates(int, int)} - * @param imeDisplayId displayId on which IME is displayed. - */ - @Dispatching(cancellable = true) - public void requestCursorUpdatesFromImm(int cursorUpdateMode, int cursorUpdateFilter, - int imeDisplayId) { - final int currentSessionId = mCurrentSessionId.get(); - dispatchWithTracing("requestCursorUpdatesFromImm", () -> { - if (currentSessionId != mCurrentSessionId.get()) { - return; // cancelled - } - requestCursorUpdatesInternal(cursorUpdateMode, cursorUpdateFilter, imeDisplayId); - }); - } - @Dispatching(cancellable = true) @Override public void requestCursorUpdates(InputConnectionCommandHeader header, int cursorUpdateMode,