Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e609a5f2 authored by Taran Singh's avatar Taran Singh Committed by Android (Google) Code Review
Browse files

Merge "Don't auto subscribe to CAI for stylus handwriting"

parents 23f1be2d 5854c92b
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -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
+0 −21
Original line number Diff line number Diff line
@@ -968,27 +968,6 @@ public final class RemoteInputConnectionImpl extends IRemoteInputConnection.Stub
        });
    }

    /**
     * Dispatches {@link InputConnection#requestCursorUpdates(int)}.
     *
     * <p>This method is intended to be called only from {@link InputMethodManager}.</p>
     * @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,