Loading core/jni/android_view_KeyCharacterMap.cpp +4 −4 Original line number Diff line number Diff line Loading @@ -48,13 +48,13 @@ static struct { class NativeKeyCharacterMap { public: NativeKeyCharacterMap(int32_t deviceId, std::unique_ptr<KeyCharacterMap> map) NativeKeyCharacterMap(DeviceId deviceId, std::unique_ptr<KeyCharacterMap> map) : mDeviceId(deviceId), mMap(std::move(map)) {} ~NativeKeyCharacterMap() { } inline int32_t getDeviceId() const { inline DeviceId getDeviceId() const { return mDeviceId; } Loading @@ -63,11 +63,11 @@ public: } private: int32_t mDeviceId; DeviceId mDeviceId; std::unique_ptr<KeyCharacterMap> mMap; }; jobject android_view_KeyCharacterMap_create(JNIEnv* env, int32_t deviceId, jobject android_view_KeyCharacterMap_create(JNIEnv* env, DeviceId deviceId, std::unique_ptr<KeyCharacterMap> kcm) { NativeKeyCharacterMap* nativeMap = new NativeKeyCharacterMap(deviceId, std::move(kcm)); if (!nativeMap) { Loading core/jni/android_view_KeyCharacterMap.h +4 −3 Original line number Diff line number Diff line Loading @@ -17,14 +17,15 @@ #ifndef _ANDROID_VIEW_KEY_CHARACTER_MAP_H #define _ANDROID_VIEW_KEY_CHARACTER_MAP_H #include "jni.h" #include <input/Input.h> #include <input/KeyCharacterMap.h> #include "jni.h" namespace android { /* Creates a KeyCharacterMap object from the given information. */ extern jobject android_view_KeyCharacterMap_create(JNIEnv* env, int32_t deviceId, extern jobject android_view_KeyCharacterMap_create(JNIEnv* env, DeviceId deviceId, std::unique_ptr<KeyCharacterMap> kcm); } // namespace android Loading services/core/jni/com_android_server_input_InputManagerService.cpp +9 −9 Original line number Diff line number Diff line Loading @@ -380,8 +380,8 @@ public: void getReaderConfiguration(InputReaderConfiguration* outConfig) override; void notifyInputDevicesChanged(const std::vector<InputDeviceInfo>& inputDevices) override; void notifyTouchpadHardwareState(const SelfContainedHardwareState& schs, int32_t deviceId) override; void notifyTouchpadGestureInfo(enum GestureType type, int32_t deviceId) override; DeviceId deviceId) override; void notifyTouchpadGestureInfo(enum GestureType type, DeviceId deviceId) override; void notifyTouchpadThreeFingerTap() override; std::shared_ptr<KeyCharacterMap> getKeyboardLayoutOverlay( const InputDeviceIdentifier& identifier, Loading @@ -391,7 +391,7 @@ public: ui::Rotation surfaceRotation) override; TouchAffineTransformation getTouchAffineTransformation(JNIEnv* env, jfloatArray matrixArr); void notifyStylusGestureStarted(int32_t deviceId, nsecs_t eventTime) override; void notifyStylusGestureStarted(DeviceId deviceId, nsecs_t eventTime) override; bool isInputMethodConnectionActive() override; std::optional<DisplayViewport> getPointerViewportForAssociatedDisplay( ui::LogicalDisplayId associatedDisplayId) override; Loading @@ -408,12 +408,12 @@ public: // ANR-related callbacks -- end void notifyInputChannelBroken(const sp<IBinder>& token) override; void notifyFocusChanged(const sp<IBinder>& oldToken, const sp<IBinder>& newToken) override; void notifySensorEvent(int32_t deviceId, InputDeviceSensorType sensorType, void notifySensorEvent(DeviceId deviceId, InputDeviceSensorType sensorType, InputDeviceSensorAccuracy accuracy, nsecs_t timestamp, const std::vector<float>& values) override; void notifySensorAccuracy(int32_t deviceId, InputDeviceSensorType sensorType, void notifySensorAccuracy(DeviceId deviceId, InputDeviceSensorType sensorType, InputDeviceSensorAccuracy accuracy) override; void notifyVibratorState(int32_t deviceId, bool isOn) override; void notifyVibratorState(DeviceId deviceId, bool isOn) override; bool filterInputEvent(const InputEvent& inputEvent, uint32_t policyFlags) override; void interceptKeyBeforeQueueing(const KeyEvent& keyEvent, uint32_t& policyFlags) override; void interceptMotionBeforeQueueing(ui::LogicalDisplayId displayId, uint32_t source, Loading Loading @@ -1076,7 +1076,7 @@ static ScopedLocalRef<jobject> createTouchpadHardwareStateObj( } void NativeInputManager::notifyTouchpadHardwareState(const SelfContainedHardwareState& schs, int32_t deviceId) { DeviceId deviceId) { ATRACE_CALL(); JNIEnv* env = jniEnv(); Loading @@ -1090,7 +1090,7 @@ void NativeInputManager::notifyTouchpadHardwareState(const SelfContainedHardware checkAndClearExceptionFromCallback(env, "notifyTouchpadHardwareState"); } void NativeInputManager::notifyTouchpadGestureInfo(enum GestureType type, int32_t deviceId) { void NativeInputManager::notifyTouchpadGestureInfo(enum GestureType type, DeviceId deviceId) { ATRACE_CALL(); JNIEnv* env = jniEnv(); Loading Loading @@ -1779,7 +1779,7 @@ TouchAffineTransformation NativeInputManager::getTouchAffineTransformation( return transform; } void NativeInputManager::notifyStylusGestureStarted(int32_t deviceId, nsecs_t eventTime) { void NativeInputManager::notifyStylusGestureStarted(DeviceId deviceId, nsecs_t eventTime) { JNIEnv* env = jniEnv(); env->CallVoidMethod(mServiceObj, gServiceClassInfo.notifyStylusGestureStarted, deviceId, eventTime); Loading Loading
core/jni/android_view_KeyCharacterMap.cpp +4 −4 Original line number Diff line number Diff line Loading @@ -48,13 +48,13 @@ static struct { class NativeKeyCharacterMap { public: NativeKeyCharacterMap(int32_t deviceId, std::unique_ptr<KeyCharacterMap> map) NativeKeyCharacterMap(DeviceId deviceId, std::unique_ptr<KeyCharacterMap> map) : mDeviceId(deviceId), mMap(std::move(map)) {} ~NativeKeyCharacterMap() { } inline int32_t getDeviceId() const { inline DeviceId getDeviceId() const { return mDeviceId; } Loading @@ -63,11 +63,11 @@ public: } private: int32_t mDeviceId; DeviceId mDeviceId; std::unique_ptr<KeyCharacterMap> mMap; }; jobject android_view_KeyCharacterMap_create(JNIEnv* env, int32_t deviceId, jobject android_view_KeyCharacterMap_create(JNIEnv* env, DeviceId deviceId, std::unique_ptr<KeyCharacterMap> kcm) { NativeKeyCharacterMap* nativeMap = new NativeKeyCharacterMap(deviceId, std::move(kcm)); if (!nativeMap) { Loading
core/jni/android_view_KeyCharacterMap.h +4 −3 Original line number Diff line number Diff line Loading @@ -17,14 +17,15 @@ #ifndef _ANDROID_VIEW_KEY_CHARACTER_MAP_H #define _ANDROID_VIEW_KEY_CHARACTER_MAP_H #include "jni.h" #include <input/Input.h> #include <input/KeyCharacterMap.h> #include "jni.h" namespace android { /* Creates a KeyCharacterMap object from the given information. */ extern jobject android_view_KeyCharacterMap_create(JNIEnv* env, int32_t deviceId, extern jobject android_view_KeyCharacterMap_create(JNIEnv* env, DeviceId deviceId, std::unique_ptr<KeyCharacterMap> kcm); } // namespace android Loading
services/core/jni/com_android_server_input_InputManagerService.cpp +9 −9 Original line number Diff line number Diff line Loading @@ -380,8 +380,8 @@ public: void getReaderConfiguration(InputReaderConfiguration* outConfig) override; void notifyInputDevicesChanged(const std::vector<InputDeviceInfo>& inputDevices) override; void notifyTouchpadHardwareState(const SelfContainedHardwareState& schs, int32_t deviceId) override; void notifyTouchpadGestureInfo(enum GestureType type, int32_t deviceId) override; DeviceId deviceId) override; void notifyTouchpadGestureInfo(enum GestureType type, DeviceId deviceId) override; void notifyTouchpadThreeFingerTap() override; std::shared_ptr<KeyCharacterMap> getKeyboardLayoutOverlay( const InputDeviceIdentifier& identifier, Loading @@ -391,7 +391,7 @@ public: ui::Rotation surfaceRotation) override; TouchAffineTransformation getTouchAffineTransformation(JNIEnv* env, jfloatArray matrixArr); void notifyStylusGestureStarted(int32_t deviceId, nsecs_t eventTime) override; void notifyStylusGestureStarted(DeviceId deviceId, nsecs_t eventTime) override; bool isInputMethodConnectionActive() override; std::optional<DisplayViewport> getPointerViewportForAssociatedDisplay( ui::LogicalDisplayId associatedDisplayId) override; Loading @@ -408,12 +408,12 @@ public: // ANR-related callbacks -- end void notifyInputChannelBroken(const sp<IBinder>& token) override; void notifyFocusChanged(const sp<IBinder>& oldToken, const sp<IBinder>& newToken) override; void notifySensorEvent(int32_t deviceId, InputDeviceSensorType sensorType, void notifySensorEvent(DeviceId deviceId, InputDeviceSensorType sensorType, InputDeviceSensorAccuracy accuracy, nsecs_t timestamp, const std::vector<float>& values) override; void notifySensorAccuracy(int32_t deviceId, InputDeviceSensorType sensorType, void notifySensorAccuracy(DeviceId deviceId, InputDeviceSensorType sensorType, InputDeviceSensorAccuracy accuracy) override; void notifyVibratorState(int32_t deviceId, bool isOn) override; void notifyVibratorState(DeviceId deviceId, bool isOn) override; bool filterInputEvent(const InputEvent& inputEvent, uint32_t policyFlags) override; void interceptKeyBeforeQueueing(const KeyEvent& keyEvent, uint32_t& policyFlags) override; void interceptMotionBeforeQueueing(ui::LogicalDisplayId displayId, uint32_t source, Loading Loading @@ -1076,7 +1076,7 @@ static ScopedLocalRef<jobject> createTouchpadHardwareStateObj( } void NativeInputManager::notifyTouchpadHardwareState(const SelfContainedHardwareState& schs, int32_t deviceId) { DeviceId deviceId) { ATRACE_CALL(); JNIEnv* env = jniEnv(); Loading @@ -1090,7 +1090,7 @@ void NativeInputManager::notifyTouchpadHardwareState(const SelfContainedHardware checkAndClearExceptionFromCallback(env, "notifyTouchpadHardwareState"); } void NativeInputManager::notifyTouchpadGestureInfo(enum GestureType type, int32_t deviceId) { void NativeInputManager::notifyTouchpadGestureInfo(enum GestureType type, DeviceId deviceId) { ATRACE_CALL(); JNIEnv* env = jniEnv(); Loading Loading @@ -1779,7 +1779,7 @@ TouchAffineTransformation NativeInputManager::getTouchAffineTransformation( return transform; } void NativeInputManager::notifyStylusGestureStarted(int32_t deviceId, nsecs_t eventTime) { void NativeInputManager::notifyStylusGestureStarted(DeviceId deviceId, nsecs_t eventTime) { JNIEnv* env = jniEnv(); env->CallVoidMethod(mServiceObj, gServiceClassInfo.notifyStylusGestureStarted, deviceId, eventTime); Loading