Loading services/core/java/com/android/server/inputmethod/HandwritingModeController.java +4 −3 Original line number Original line Diff line number Diff line Loading @@ -74,6 +74,7 @@ final class HandwritingModeController { private final Context mContext; private final Context mContext; // This must be the looper for the UiThread. // This must be the looper for the UiThread. private final Looper mLooper; private final Looper mLooper; private final InputManager mInputManager; private final InputManagerInternal mInputManagerInternal; private final InputManagerInternal mInputManagerInternal; private final WindowManagerInternal mWindowManagerInternal; private final WindowManagerInternal mWindowManagerInternal; private final PackageManagerInternal mPackageManagerInternal; private final PackageManagerInternal mPackageManagerInternal; Loading Loading @@ -103,6 +104,7 @@ final class HandwritingModeController { mContext = context; mContext = context; mLooper = uiThreadLooper; mLooper = uiThreadLooper; mCurrentDisplayId = Display.INVALID_DISPLAY; mCurrentDisplayId = Display.INVALID_DISPLAY; mInputManager = context.getSystemService(InputManager.class); mInputManagerInternal = LocalServices.getService(InputManagerInternal.class); mInputManagerInternal = LocalServices.getService(InputManagerInternal.class); mWindowManagerInternal = LocalServices.getService(WindowManagerInternal.class); mWindowManagerInternal = LocalServices.getService(WindowManagerInternal.class); mPackageManagerInternal = LocalServices.getService(PackageManagerInternal.class); mPackageManagerInternal = LocalServices.getService(PackageManagerInternal.class); Loading Loading @@ -319,8 +321,7 @@ final class HandwritingModeController { } } if (DEBUG) Slog.d(TAG, "Starting handwriting session in display: " + mCurrentDisplayId); if (DEBUG) Slog.d(TAG, "Starting handwriting session in display: " + mCurrentDisplayId); InputManagerGlobal.getInstance() mInputManager.pilferPointers(mHandwritingSurface.getInputChannel().getToken()); .pilferPointers(mHandwritingSurface.getInputChannel().getToken()); // Stop processing more events. // Stop processing more events. mHandwritingEventReceiver.dispose(); mHandwritingEventReceiver.dispose(); Loading @@ -335,7 +336,7 @@ final class HandwritingModeController { mHandwritingSurface.startIntercepting(imePid, imeUid); mHandwritingSurface.startIntercepting(imePid, imeUid); // Unset the pointer icon for the stylus in case the app had set it. // Unset the pointer icon for the stylus in case the app had set it. Objects.requireNonNull(mContext.getSystemService(InputManager.class)).setPointerIcon( mInputManager.setPointerIcon( PointerIcon.getSystemIcon(mContext, PointerIcon.TYPE_NOT_SPECIFIED), PointerIcon.getSystemIcon(mContext, PointerIcon.TYPE_NOT_SPECIFIED), downEvent.getDisplayId(), downEvent.getDeviceId(), downEvent.getPointerId(0), downEvent.getDisplayId(), downEvent.getDeviceId(), downEvent.getPointerId(0), mHandwritingSurface.getInputChannel().getToken()); mHandwritingSurface.getInputChannel().getToken()); Loading Loading
services/core/java/com/android/server/inputmethod/HandwritingModeController.java +4 −3 Original line number Original line Diff line number Diff line Loading @@ -74,6 +74,7 @@ final class HandwritingModeController { private final Context mContext; private final Context mContext; // This must be the looper for the UiThread. // This must be the looper for the UiThread. private final Looper mLooper; private final Looper mLooper; private final InputManager mInputManager; private final InputManagerInternal mInputManagerInternal; private final InputManagerInternal mInputManagerInternal; private final WindowManagerInternal mWindowManagerInternal; private final WindowManagerInternal mWindowManagerInternal; private final PackageManagerInternal mPackageManagerInternal; private final PackageManagerInternal mPackageManagerInternal; Loading Loading @@ -103,6 +104,7 @@ final class HandwritingModeController { mContext = context; mContext = context; mLooper = uiThreadLooper; mLooper = uiThreadLooper; mCurrentDisplayId = Display.INVALID_DISPLAY; mCurrentDisplayId = Display.INVALID_DISPLAY; mInputManager = context.getSystemService(InputManager.class); mInputManagerInternal = LocalServices.getService(InputManagerInternal.class); mInputManagerInternal = LocalServices.getService(InputManagerInternal.class); mWindowManagerInternal = LocalServices.getService(WindowManagerInternal.class); mWindowManagerInternal = LocalServices.getService(WindowManagerInternal.class); mPackageManagerInternal = LocalServices.getService(PackageManagerInternal.class); mPackageManagerInternal = LocalServices.getService(PackageManagerInternal.class); Loading Loading @@ -319,8 +321,7 @@ final class HandwritingModeController { } } if (DEBUG) Slog.d(TAG, "Starting handwriting session in display: " + mCurrentDisplayId); if (DEBUG) Slog.d(TAG, "Starting handwriting session in display: " + mCurrentDisplayId); InputManagerGlobal.getInstance() mInputManager.pilferPointers(mHandwritingSurface.getInputChannel().getToken()); .pilferPointers(mHandwritingSurface.getInputChannel().getToken()); // Stop processing more events. // Stop processing more events. mHandwritingEventReceiver.dispose(); mHandwritingEventReceiver.dispose(); Loading @@ -335,7 +336,7 @@ final class HandwritingModeController { mHandwritingSurface.startIntercepting(imePid, imeUid); mHandwritingSurface.startIntercepting(imePid, imeUid); // Unset the pointer icon for the stylus in case the app had set it. // Unset the pointer icon for the stylus in case the app had set it. Objects.requireNonNull(mContext.getSystemService(InputManager.class)).setPointerIcon( mInputManager.setPointerIcon( PointerIcon.getSystemIcon(mContext, PointerIcon.TYPE_NOT_SPECIFIED), PointerIcon.getSystemIcon(mContext, PointerIcon.TYPE_NOT_SPECIFIED), downEvent.getDisplayId(), downEvent.getDeviceId(), downEvent.getPointerId(0), downEvent.getDisplayId(), downEvent.getDeviceId(), downEvent.getPointerId(0), mHandwritingSurface.getInputChannel().getToken()); mHandwritingSurface.getInputChannel().getToken()); Loading