Loading include/input/Input.h +2 −3 Original line number Diff line number Diff line Loading @@ -377,7 +377,6 @@ struct PointerCoords { // window scale. The global scale will be applied to TOUCH/TOOL_MAJOR/MINOR // axes, however the window scaling will not. void scale(float globalScale, float windowXScale, float windowYScale); void applyOffset(float xOffset, float yOffset); void transform(const ui::Transform& transform); Loading Loading @@ -567,7 +566,7 @@ public: inline float getYOffset() const { return mTransform.ty(); } inline ui::Transform getTransform() const { return mTransform; } inline const ui::Transform& getTransform() const { return mTransform; } inline float getXPrecision() const { return mXPrecision; } Loading @@ -583,7 +582,7 @@ public: void setCursorPosition(float x, float y); ui::Transform getRawTransform() const { return mRawTransform; } inline const ui::Transform& getRawTransform() const { return mRawTransform; } static inline bool isValidCursorPosition(float x, float y) { return !isnan(x) && !isnan(y); } Loading libs/input/Input.cpp +0 −5 Original line number Diff line number Diff line Loading @@ -343,11 +343,6 @@ void PointerCoords::scale(float globalScaleFactor, float windowXScale, float win scaleAxisValue(*this, AMOTION_EVENT_AXIS_RELATIVE_Y, windowYScale); } void PointerCoords::applyOffset(float xOffset, float yOffset) { setAxisValue(AMOTION_EVENT_AXIS_X, getX() + xOffset); setAxisValue(AMOTION_EVENT_AXIS_Y, getY() + yOffset); } #ifdef __linux__ status_t PointerCoords::readFromParcel(Parcel* parcel) { bits = parcel->readInt64(); Loading services/inputflinger/dispatcher/Entry.cpp +1 −4 Original line number Diff line number Diff line Loading @@ -214,7 +214,7 @@ MotionEntry::MotionEntry(int32_t id, nsecs_t eventTime, int32_t deviceId, uint32 int32_t edgeFlags, float xPrecision, float yPrecision, float xCursorPosition, float yCursorPosition, nsecs_t downTime, uint32_t pointerCount, const PointerProperties* pointerProperties, const PointerCoords* pointerCoords, float xOffset, float yOffset) const PointerCoords* pointerCoords) : EventEntry(id, Type::MOTION, eventTime, policyFlags), deviceId(deviceId), source(source), Loading @@ -235,9 +235,6 @@ MotionEntry::MotionEntry(int32_t id, nsecs_t eventTime, int32_t deviceId, uint32 for (uint32_t i = 0; i < pointerCount; i++) { this->pointerProperties[i].copyFrom(pointerProperties[i]); this->pointerCoords[i].copyFrom(pointerCoords[i]); if (xOffset || yOffset) { this->pointerCoords[i].applyOffset(xOffset, yOffset); } } } Loading services/inputflinger/dispatcher/Entry.h +1 −2 Original line number Diff line number Diff line Loading @@ -184,8 +184,7 @@ struct MotionEntry : EventEntry { int32_t metaState, int32_t buttonState, MotionClassification classification, int32_t edgeFlags, float xPrecision, float yPrecision, float xCursorPosition, float yCursorPosition, nsecs_t downTime, uint32_t pointerCount, const PointerProperties* pointerProperties, const PointerCoords* pointerCoords, float xOffset, float yOffset); const PointerProperties* pointerProperties, const PointerCoords* pointerCoords); std::string getDescription() const override; ~MotionEntry() override; Loading services/inputflinger/dispatcher/InputDispatcher.cpp +5 −5 Original line number Diff line number Diff line Loading @@ -378,7 +378,7 @@ std::unique_ptr<DispatchEntry> createDispatchEntry(const InputTarget& inputTarge motionEntry.yPrecision, motionEntry.xCursorPosition, motionEntry.yCursorPosition, motionEntry.downTime, motionEntry.pointerCount, motionEntry.pointerProperties, pointerCoords.data(), 0 /* xOffset */, 0 /* yOffset */); pointerCoords.data()); if (motionEntry.injectionState) { combinedMotionEntry->injectionState = motionEntry.injectionState; Loading Loading @@ -3752,7 +3752,7 @@ std::unique_ptr<MotionEntry> InputDispatcher::splitMotionEvent( originalMotionEntry.xCursorPosition, originalMotionEntry.yCursorPosition, originalMotionEntry.downTime, splitPointerCount, splitPointerProperties, splitPointerCoords, 0, 0); splitPointerProperties, splitPointerCoords); if (originalMotionEntry.injectionState) { splitMotionEntry->injectionState = originalMotionEntry.injectionState; Loading Loading @@ -3978,7 +3978,7 @@ void InputDispatcher::notifyMotion(const NotifyMotionArgs* args) { args->xPrecision, args->yPrecision, args->xCursorPosition, args->yCursorPosition, args->downTime, args->pointerCount, args->pointerProperties, args->pointerCoords, 0, 0); args->pointerProperties, args->pointerCoords); if (args->id != android::os::IInputConstants::INVALID_INPUT_EVENT_ID && IdGenerator::getSource(args->id) == IdGenerator::Source::INPUT_READER && Loading Loading @@ -4208,7 +4208,7 @@ InputEventInjectionResult InputDispatcher::injectInputEvent( motionEvent.getRawXCursorPosition(), motionEvent.getRawYCursorPosition(), motionEvent.getDownTime(), uint32_t(pointerCount), pointerProperties, samplePointerCoords, 0, 0); pointerProperties, samplePointerCoords); transformMotionEntryForInjectionLocked(*injectedEntry, motionEvent.getTransform()); injectedEntries.push(std::move(injectedEntry)); for (size_t i = motionEvent.getHistorySize(); i > 0; i--) { Loading @@ -4228,7 +4228,7 @@ InputEventInjectionResult InputDispatcher::injectInputEvent( motionEvent.getRawYCursorPosition(), motionEvent.getDownTime(), uint32_t(pointerCount), pointerProperties, samplePointerCoords, 0, 0); samplePointerCoords); transformMotionEntryForInjectionLocked(*nextInjectedEntry, motionEvent.getTransform()); injectedEntries.push(std::move(nextInjectedEntry)); Loading Loading
include/input/Input.h +2 −3 Original line number Diff line number Diff line Loading @@ -377,7 +377,6 @@ struct PointerCoords { // window scale. The global scale will be applied to TOUCH/TOOL_MAJOR/MINOR // axes, however the window scaling will not. void scale(float globalScale, float windowXScale, float windowYScale); void applyOffset(float xOffset, float yOffset); void transform(const ui::Transform& transform); Loading Loading @@ -567,7 +566,7 @@ public: inline float getYOffset() const { return mTransform.ty(); } inline ui::Transform getTransform() const { return mTransform; } inline const ui::Transform& getTransform() const { return mTransform; } inline float getXPrecision() const { return mXPrecision; } Loading @@ -583,7 +582,7 @@ public: void setCursorPosition(float x, float y); ui::Transform getRawTransform() const { return mRawTransform; } inline const ui::Transform& getRawTransform() const { return mRawTransform; } static inline bool isValidCursorPosition(float x, float y) { return !isnan(x) && !isnan(y); } Loading
libs/input/Input.cpp +0 −5 Original line number Diff line number Diff line Loading @@ -343,11 +343,6 @@ void PointerCoords::scale(float globalScaleFactor, float windowXScale, float win scaleAxisValue(*this, AMOTION_EVENT_AXIS_RELATIVE_Y, windowYScale); } void PointerCoords::applyOffset(float xOffset, float yOffset) { setAxisValue(AMOTION_EVENT_AXIS_X, getX() + xOffset); setAxisValue(AMOTION_EVENT_AXIS_Y, getY() + yOffset); } #ifdef __linux__ status_t PointerCoords::readFromParcel(Parcel* parcel) { bits = parcel->readInt64(); Loading
services/inputflinger/dispatcher/Entry.cpp +1 −4 Original line number Diff line number Diff line Loading @@ -214,7 +214,7 @@ MotionEntry::MotionEntry(int32_t id, nsecs_t eventTime, int32_t deviceId, uint32 int32_t edgeFlags, float xPrecision, float yPrecision, float xCursorPosition, float yCursorPosition, nsecs_t downTime, uint32_t pointerCount, const PointerProperties* pointerProperties, const PointerCoords* pointerCoords, float xOffset, float yOffset) const PointerCoords* pointerCoords) : EventEntry(id, Type::MOTION, eventTime, policyFlags), deviceId(deviceId), source(source), Loading @@ -235,9 +235,6 @@ MotionEntry::MotionEntry(int32_t id, nsecs_t eventTime, int32_t deviceId, uint32 for (uint32_t i = 0; i < pointerCount; i++) { this->pointerProperties[i].copyFrom(pointerProperties[i]); this->pointerCoords[i].copyFrom(pointerCoords[i]); if (xOffset || yOffset) { this->pointerCoords[i].applyOffset(xOffset, yOffset); } } } Loading
services/inputflinger/dispatcher/Entry.h +1 −2 Original line number Diff line number Diff line Loading @@ -184,8 +184,7 @@ struct MotionEntry : EventEntry { int32_t metaState, int32_t buttonState, MotionClassification classification, int32_t edgeFlags, float xPrecision, float yPrecision, float xCursorPosition, float yCursorPosition, nsecs_t downTime, uint32_t pointerCount, const PointerProperties* pointerProperties, const PointerCoords* pointerCoords, float xOffset, float yOffset); const PointerProperties* pointerProperties, const PointerCoords* pointerCoords); std::string getDescription() const override; ~MotionEntry() override; Loading
services/inputflinger/dispatcher/InputDispatcher.cpp +5 −5 Original line number Diff line number Diff line Loading @@ -378,7 +378,7 @@ std::unique_ptr<DispatchEntry> createDispatchEntry(const InputTarget& inputTarge motionEntry.yPrecision, motionEntry.xCursorPosition, motionEntry.yCursorPosition, motionEntry.downTime, motionEntry.pointerCount, motionEntry.pointerProperties, pointerCoords.data(), 0 /* xOffset */, 0 /* yOffset */); pointerCoords.data()); if (motionEntry.injectionState) { combinedMotionEntry->injectionState = motionEntry.injectionState; Loading Loading @@ -3752,7 +3752,7 @@ std::unique_ptr<MotionEntry> InputDispatcher::splitMotionEvent( originalMotionEntry.xCursorPosition, originalMotionEntry.yCursorPosition, originalMotionEntry.downTime, splitPointerCount, splitPointerProperties, splitPointerCoords, 0, 0); splitPointerProperties, splitPointerCoords); if (originalMotionEntry.injectionState) { splitMotionEntry->injectionState = originalMotionEntry.injectionState; Loading Loading @@ -3978,7 +3978,7 @@ void InputDispatcher::notifyMotion(const NotifyMotionArgs* args) { args->xPrecision, args->yPrecision, args->xCursorPosition, args->yCursorPosition, args->downTime, args->pointerCount, args->pointerProperties, args->pointerCoords, 0, 0); args->pointerProperties, args->pointerCoords); if (args->id != android::os::IInputConstants::INVALID_INPUT_EVENT_ID && IdGenerator::getSource(args->id) == IdGenerator::Source::INPUT_READER && Loading Loading @@ -4208,7 +4208,7 @@ InputEventInjectionResult InputDispatcher::injectInputEvent( motionEvent.getRawXCursorPosition(), motionEvent.getRawYCursorPosition(), motionEvent.getDownTime(), uint32_t(pointerCount), pointerProperties, samplePointerCoords, 0, 0); pointerProperties, samplePointerCoords); transformMotionEntryForInjectionLocked(*injectedEntry, motionEvent.getTransform()); injectedEntries.push(std::move(injectedEntry)); for (size_t i = motionEvent.getHistorySize(); i > 0; i--) { Loading @@ -4228,7 +4228,7 @@ InputEventInjectionResult InputDispatcher::injectInputEvent( motionEvent.getRawYCursorPosition(), motionEvent.getDownTime(), uint32_t(pointerCount), pointerProperties, samplePointerCoords, 0, 0); samplePointerCoords); transformMotionEntryForInjectionLocked(*nextInjectedEntry, motionEvent.getTransform()); injectedEntries.push(std::move(nextInjectedEntry)); Loading