Migrate internal pilferPointers usages to InputManager call
Bug: 257977069 Test: presubmit Change-Id: Iec7123d71a58122854ba9a2576f70b64e8d3f214
This commit is contained in:
@@ -135,12 +135,6 @@ public abstract class InputManagerInternal {
|
||||
/** Create an {@link InputChannel} that is registered to InputDispatcher. */
|
||||
public abstract InputChannel createInputChannel(String inputChannelName);
|
||||
|
||||
/**
|
||||
* Pilfer pointers from the input channel with the given token so that ongoing gestures are
|
||||
* canceled for all other channels.
|
||||
*/
|
||||
public abstract void pilferPointers(IBinder token);
|
||||
|
||||
/**
|
||||
* Increments keyboard backlight level if the device has an associated keyboard backlight
|
||||
* {@see Light.LIGHT_TYPE_KEYBOARD_BACKLIGHT}
|
||||
|
||||
@@ -3781,11 +3781,6 @@ public class InputManagerService extends IInputManager.Stub
|
||||
return InputManagerService.this.createInputChannel(inputChannelName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void pilferPointers(IBinder token) {
|
||||
mNative.pilferPointers(token);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void incrementKeyboardBacklight(int deviceId) {
|
||||
mKeyboardBacklightController.incrementKeyboardBacklight(deviceId);
|
||||
|
||||
@@ -18,9 +18,12 @@ package com.android.server.inputmethod;
|
||||
|
||||
import static android.view.InputDevice.SOURCE_STYLUS;
|
||||
|
||||
import android.Manifest;
|
||||
import android.annotation.AnyThread;
|
||||
import android.annotation.Nullable;
|
||||
import android.annotation.RequiresPermission;
|
||||
import android.annotation.UiThread;
|
||||
import android.hardware.input.InputManager;
|
||||
import android.os.IBinder;
|
||||
import android.os.Looper;
|
||||
import android.util.Slog;
|
||||
@@ -141,6 +144,7 @@ final class HandwritingModeController {
|
||||
* input events and disposing the input event receiver.
|
||||
* @return the handwriting session to send to the IME, or null if the request was invalid.
|
||||
*/
|
||||
@RequiresPermission(Manifest.permission.MONITOR_INPUT)
|
||||
@UiThread
|
||||
@Nullable
|
||||
HandwritingSession startHandwritingSession(
|
||||
@@ -169,7 +173,7 @@ final class HandwritingModeController {
|
||||
}
|
||||
if (DEBUG) Slog.d(TAG, "Starting handwriting session in display: " + mCurrentDisplayId);
|
||||
|
||||
mInputManagerInternal.pilferPointers(mHandwritingSurface.getInputChannel().getToken());
|
||||
InputManager.getInstance().pilferPointers(mHandwritingSurface.getInputChannel().getToken());
|
||||
|
||||
// Stop processing more events.
|
||||
mHandwritingEventReceiver.dispose();
|
||||
|
||||
Reference in New Issue
Block a user