Loading services/core/java/com/android/server/inputmethod/InputMethodManagerService.java +8 −6 Original line number Diff line number Diff line Loading @@ -1234,8 +1234,9 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl. } @GuardedBy("ImfLock.class") private void onUpdateEditorToolTypeLocked(@MotionEvent.ToolType int toolType) { final IInputMethodInvoker curMethod = getCurMethodLocked(); private void onUpdateEditorToolTypeLocked(@MotionEvent.ToolType int toolType, @UserIdInt int userId) { final var curMethod = getInputMethodBindingController(userId).getCurMethod(); if (curMethod != null) { curMethod.updateEditorToolType(toolType); } Loading Loading @@ -3456,9 +3457,9 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl. userData.mCurStatsToken = null; if (Flags.useHandwritingListenerForTooltype()) { maybeReportToolType(); maybeReportToolType(userId); } else if (lastClickToolType != MotionEvent.TOOL_TYPE_UNKNOWN) { onUpdateEditorToolTypeLocked(lastClickToolType); onUpdateEditorToolTypeLocked(lastClickToolType, userId); } mVisibilityApplier.performShowIme(windowToken, statsToken, mVisibilityStateComputer.getShowFlagsForInputMethodServiceOnly(), Loading @@ -3473,7 +3474,8 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl. } @GuardedBy("ImfLock.class") private void maybeReportToolType() { private void maybeReportToolType(@UserIdInt int userId) { // TODO(b/356638981): This needs to be compatible with visible background users. int lastDeviceId = mInputManagerInternal.getLastUsedInputDeviceId(); final InputManager im = mContext.getSystemService(InputManager.class); if (im == null) { Loading @@ -3492,7 +3494,7 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl. // other toolTypes are irrelevant and reported as unknown. toolType = MotionEvent.TOOL_TYPE_UNKNOWN; } onUpdateEditorToolTypeLocked(toolType); onUpdateEditorToolTypeLocked(toolType, userId); } @Override Loading Loading
services/core/java/com/android/server/inputmethod/InputMethodManagerService.java +8 −6 Original line number Diff line number Diff line Loading @@ -1234,8 +1234,9 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl. } @GuardedBy("ImfLock.class") private void onUpdateEditorToolTypeLocked(@MotionEvent.ToolType int toolType) { final IInputMethodInvoker curMethod = getCurMethodLocked(); private void onUpdateEditorToolTypeLocked(@MotionEvent.ToolType int toolType, @UserIdInt int userId) { final var curMethod = getInputMethodBindingController(userId).getCurMethod(); if (curMethod != null) { curMethod.updateEditorToolType(toolType); } Loading Loading @@ -3456,9 +3457,9 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl. userData.mCurStatsToken = null; if (Flags.useHandwritingListenerForTooltype()) { maybeReportToolType(); maybeReportToolType(userId); } else if (lastClickToolType != MotionEvent.TOOL_TYPE_UNKNOWN) { onUpdateEditorToolTypeLocked(lastClickToolType); onUpdateEditorToolTypeLocked(lastClickToolType, userId); } mVisibilityApplier.performShowIme(windowToken, statsToken, mVisibilityStateComputer.getShowFlagsForInputMethodServiceOnly(), Loading @@ -3473,7 +3474,8 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl. } @GuardedBy("ImfLock.class") private void maybeReportToolType() { private void maybeReportToolType(@UserIdInt int userId) { // TODO(b/356638981): This needs to be compatible with visible background users. int lastDeviceId = mInputManagerInternal.getLastUsedInputDeviceId(); final InputManager im = mContext.getSystemService(InputManager.class); if (im == null) { Loading @@ -3492,7 +3494,7 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl. // other toolTypes are irrelevant and reported as unknown. toolType = MotionEvent.TOOL_TYPE_UNKNOWN; } onUpdateEditorToolTypeLocked(toolType); onUpdateEditorToolTypeLocked(toolType, userId); } @Override Loading