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

Commit 5a1286dc authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Simplify IMMS#onUpdateEditorToolType() a bit" into main

parents a5336f51 1544c80d
Loading
Loading
Loading
Loading
+7 −8
Original line number Diff line number Diff line
@@ -1233,14 +1233,13 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
        }
    }

    private void onUpdateEditorToolType(int toolType) {
        synchronized (ImfLock.class) {
            IInputMethodInvoker curMethod = getCurMethodLocked();
    @GuardedBy("ImfLock.class")
    private void onUpdateEditorToolTypeLocked(@MotionEvent.ToolType int toolType) {
        final IInputMethodInvoker curMethod = getCurMethodLocked();
        if (curMethod != null) {
            curMethod.updateEditorToolType(toolType);
        }
    }
    }

    private void discardHandwritingDelegationText() {
        synchronized (ImfLock.class) {
@@ -3459,7 +3458,7 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
            if (Flags.useHandwritingListenerForTooltype()) {
                maybeReportToolType();
            } else if (lastClickToolType != MotionEvent.TOOL_TYPE_UNKNOWN) {
                onUpdateEditorToolType(lastClickToolType);
                onUpdateEditorToolTypeLocked(lastClickToolType);
            }
            mVisibilityApplier.performShowIme(windowToken, statsToken,
                    mVisibilityStateComputer.getShowFlagsForInputMethodServiceOnly(),
@@ -3493,7 +3492,7 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
            // other toolTypes are irrelevant and reported as unknown.
            toolType = MotionEvent.TOOL_TYPE_UNKNOWN;
        }
        onUpdateEditorToolType(toolType);
        onUpdateEditorToolTypeLocked(toolType);
    }

    @Override