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

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

Merge "Remove usage of last toolType for new startInput" into main

parents eb135e29 5bcb1494
Loading
Loading
Loading
Loading
+1 −8
Original line number Diff line number Diff line
@@ -401,10 +401,7 @@ public class InputMethodService extends AbstractInputMethodService {
    private long mStylusHwSessionsTimeout = STYLUS_HANDWRITING_IDLE_TIMEOUT_MS;
    private Runnable mStylusWindowIdleTimeoutRunnable;
    private long mStylusWindowIdleTimeoutForTest;
    /**
     * Tracks last {@link MotionEvent#getToolType(int)} used for {@link MotionEvent#ACTION_DOWN}.
     **/
    private int mLastUsedToolType;

    /**
     * Tracks the ctrl+shift shortcut
     **/
@@ -1368,7 +1365,6 @@ public class InputMethodService extends AbstractInputMethodService {

    private void updateEditorToolTypeInternal(int toolType) {
        if (Flags.useHandwritingListenerForTooltype()) {
            mLastUsedToolType = toolType;
            if (mInputEditorInfo != null) {
                mInputEditorInfo.setInitialToolType(toolType);
            }
@@ -3385,9 +3381,6 @@ public class InputMethodService extends AbstractInputMethodService {
                null /* icProto */);
        mInputStarted = true;
        mStartedInputConnection = ic;
        if (Flags.useHandwritingListenerForTooltype()) {
            editorInfo.setInitialToolType(mLastUsedToolType);
        }
        mInputEditorInfo = editorInfo;
        initialize();
        mInlineSuggestionSessionController.notifyOnStartInput(