diff options
| -rw-r--r-- | services/core/java/com/android/server/input/InputManagerService.java | 5 | ||||
| -rw-r--r-- | services/core/jni/com_android_server_input_InputManagerService.cpp | 12 |
2 files changed, 17 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/input/InputManagerService.java b/services/core/java/com/android/server/input/InputManagerService.java index 69b0e65e38da..3d990cc7c9c4 100644 --- a/services/core/java/com/android/server/input/InputManagerService.java +++ b/services/core/java/com/android/server/input/InputManagerService.java @@ -3052,6 +3052,11 @@ public class InputManagerService extends IInputManager.Stub com.android.internal.R.bool.config_perDisplayFocusEnabled); } + // Native callback. + @SuppressWarnings("unused") + private void notifyStylusGestureStarted(int deviceId, long eventTime) { + } + /** * Flatten a map into a string list, with value positioned directly next to the * key. diff --git a/services/core/jni/com_android_server_input_InputManagerService.cpp b/services/core/jni/com_android_server_input_InputManagerService.cpp index 3f380e7914d0..633b8d30163c 100644 --- a/services/core/jni/com_android_server_input_InputManagerService.cpp +++ b/services/core/jni/com_android_server_input_InputManagerService.cpp @@ -107,6 +107,7 @@ static struct { jmethodID notifyFocusChanged; jmethodID notifySensorEvent; jmethodID notifySensorAccuracy; + jmethodID notifyStylusGestureStarted; jmethodID notifyVibratorState; jmethodID filterInputEvent; jmethodID interceptKeyBeforeQueueing; @@ -312,6 +313,7 @@ public: int32_t surfaceRotation) override; TouchAffineTransformation getTouchAffineTransformation(JNIEnv* env, jfloatArray matrixArr); + void notifyStylusGestureStarted(int32_t deviceId, nsecs_t eventTime) override; /* --- InputDispatcherPolicyInterface implementation --- */ @@ -1177,6 +1179,13 @@ TouchAffineTransformation NativeInputManager::getTouchAffineTransformation( return transform; } +void NativeInputManager::notifyStylusGestureStarted(int32_t deviceId, nsecs_t eventTime) { + JNIEnv* env = jniEnv(); + env->CallVoidMethod(mServiceObj, gServiceClassInfo.notifyStylusGestureStarted, deviceId, + eventTime); + checkAndClearExceptionFromCallback(env, "notifyStylusGestureStarted"); +} + bool NativeInputManager::filterInputEvent(const InputEvent* inputEvent, uint32_t policyFlags) { ATRACE_CALL(); jobject inputEventObj; @@ -2469,6 +2478,9 @@ int register_android_server_InputManager(JNIEnv* env) { GET_METHOD_ID(gServiceClassInfo.notifySensorAccuracy, clazz, "notifySensorAccuracy", "(III)V"); + GET_METHOD_ID(gServiceClassInfo.notifyStylusGestureStarted, clazz, "notifyStylusGestureStarted", + "(IJ)V"); + GET_METHOD_ID(gServiceClassInfo.notifyVibratorState, clazz, "notifyVibratorState", "(IZ)V"); GET_METHOD_ID(gServiceClassInfo.notifyNoFocusedWindowAnr, clazz, "notifyNoFocusedWindowAnr", |