Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b9b18509 authored by Prabir Pradhan's avatar Prabir Pradhan
Browse files

Add display transform to MotionEvent for raw coords

Since input now works in display coordinates, we need to include the
display projection with MotionEvent so that the getRaw API can continue
to report logical display coordinates.

It is also important to highlight the difference in the coordinate
systems used by regular input windows and input monitors. MotionEvents
coming from input monitors will always report values in unrotated
logical display coordinates, because we do not yet have an API to report
unrotated values in MotionEvents.

Bug: 179274888
Test: presubmit
Test: manual, ensure input works
Change-Id: Ief3b2b31c6644beaa2f8c4b90302f441f93ab960
parent df41c269
Loading
Loading
Loading
Loading
+4 −8
Original line number Original line Diff line number Diff line
@@ -579,9 +579,7 @@ public:


    void setCursorPosition(float x, float y);
    void setCursorPosition(float x, float y);


    uint32_t getDisplayOrientation() const { return mDisplayOrientation; }
    ui::Transform getRawTransform() const { return mRawTransform; }

    int2 getDisplaySize() const { return {mDisplayWidth, mDisplayHeight}; }


    static inline bool isValidCursorPosition(float x, float y) { return !isnan(x) && !isnan(y); }
    static inline bool isValidCursorPosition(float x, float y) { return !isnan(x) && !isnan(y); }


@@ -757,8 +755,8 @@ public:
                    int32_t flags, int32_t edgeFlags, int32_t metaState, int32_t buttonState,
                    int32_t flags, int32_t edgeFlags, int32_t metaState, int32_t buttonState,
                    MotionClassification classification, const ui::Transform& transform,
                    MotionClassification classification, const ui::Transform& transform,
                    float xPrecision, float yPrecision, float rawXCursorPosition,
                    float xPrecision, float yPrecision, float rawXCursorPosition,
                    float rawYCursorPosition, uint32_t displayOrientation, int32_t displayWidth,
                    float rawYCursorPosition, const ui::Transform& rawTransform, nsecs_t downTime,
                    int32_t displayHeight, nsecs_t downTime, nsecs_t eventTime, size_t pointerCount,
                    nsecs_t eventTime, size_t pointerCount,
                    const PointerProperties* pointerProperties, const PointerCoords* pointerCoords);
                    const PointerProperties* pointerProperties, const PointerCoords* pointerCoords);


    void copyFrom(const MotionEvent* other, bool keepHistory);
    void copyFrom(const MotionEvent* other, bool keepHistory);
@@ -816,9 +814,7 @@ protected:
    float mYPrecision;
    float mYPrecision;
    float mRawXCursorPosition;
    float mRawXCursorPosition;
    float mRawYCursorPosition;
    float mRawYCursorPosition;
    uint32_t mDisplayOrientation;
    ui::Transform mRawTransform;
    int32_t mDisplayWidth;
    int32_t mDisplayHeight;
    nsecs_t mDownTime;
    nsecs_t mDownTime;
    Vector<PointerProperties> mPointerProperties;
    Vector<PointerProperties> mPointerProperties;
    std::vector<nsecs_t> mSampleEventTimes;
    std::vector<nsecs_t> mSampleEventTimes;
+15 −14
Original line number Original line Diff line number Diff line
@@ -114,7 +114,7 @@ struct InputMessage {


        struct Motion {
        struct Motion {
            int32_t eventId;
            int32_t eventId;
            uint32_t empty1;
            uint32_t pointerCount;
            nsecs_t eventTime __attribute__((aligned(8)));
            nsecs_t eventTime __attribute__((aligned(8)));
            int32_t deviceId;
            int32_t deviceId;
            int32_t source;
            int32_t source;
@@ -129,20 +129,22 @@ struct InputMessage {
            uint8_t empty2[3];                   // 3 bytes to fill gap created by classification
            uint8_t empty2[3];                   // 3 bytes to fill gap created by classification
            int32_t edgeFlags;
            int32_t edgeFlags;
            nsecs_t downTime __attribute__((aligned(8)));
            nsecs_t downTime __attribute__((aligned(8)));
            float dsdx;
            float dsdx; // Begin window transform
            float dtdx;
            float dtdx; //
            float dtdy;
            float dtdy; //
            float dsdy;
            float dsdy; //
            float tx;
            float tx;   //
            float ty;
            float ty;   // End window transform
            float xPrecision;
            float xPrecision;
            float yPrecision;
            float yPrecision;
            float xCursorPosition;
            float xCursorPosition;
            float yCursorPosition;
            float yCursorPosition;
            uint32_t displayOrientation;
            float dsdxRaw; // Begin raw transform
            int32_t displayWidth;
            float dtdxRaw; //
            int32_t displayHeight;
            float dtdyRaw; //
            uint32_t pointerCount;
            float dsdyRaw; //
            float txRaw;   //
            float tyRaw;   // End raw transform
            /**
            /**
             * The "pointers" field must be the last field of the struct InputMessage.
             * The "pointers" field must be the last field of the struct InputMessage.
             * When we send the struct InputMessage across the socket, we are not
             * When we send the struct InputMessage across the socket, we are not
@@ -367,9 +369,8 @@ public:
                                int32_t metaState, int32_t buttonState,
                                int32_t metaState, int32_t buttonState,
                                MotionClassification classification, const ui::Transform& transform,
                                MotionClassification classification, const ui::Transform& transform,
                                float xPrecision, float yPrecision, float xCursorPosition,
                                float xPrecision, float yPrecision, float xCursorPosition,
                                float yCursorPosition, uint32_t displayOrientation,
                                float yCursorPosition, const ui::Transform& rawTransform,
                                int32_t displayWidth, int32_t displayHeight, nsecs_t downTime,
                                nsecs_t downTime, nsecs_t eventTime, uint32_t pointerCount,
                                nsecs_t eventTime, uint32_t pointerCount,
                                const PointerProperties* pointerProperties,
                                const PointerProperties* pointerProperties,
                                const PointerCoords* pointerCoords);
                                const PointerCoords* pointerCoords);


+29 −54
Original line number Original line Diff line number Diff line
@@ -76,36 +76,13 @@ float transformAngle(const ui::Transform& transform, float angleRadians) {
    return result;
    return result;
}
}


// Rotates the given point to the specified orientation. If the display width and height are
vec2 transformWithoutTranslation(const ui::Transform& transform, float x, float y) {
// provided, the point is rotated in the screen space. Otherwise, the point is rotated about the
// origin. This helper is used to avoid the extra overhead of creating new Transforms.
vec2 rotatePoint(uint32_t orientation, float x, float y, int32_t displayWidth = 0,
                 int32_t displayHeight = 0) {
    if (orientation == ui::Transform::ROT_0) {
        return {x, y};
    }

    vec2 xy(x, y);
    if (orientation == ui::Transform::ROT_90) {
        xy.x = displayHeight - y;
        xy.y = x;
    } else if (orientation == ui::Transform::ROT_180) {
        xy.x = displayWidth - x;
        xy.y = displayHeight - y;
    } else if (orientation == ui::Transform::ROT_270) {
        xy.x = y;
        xy.y = displayWidth - x;
    }
    return xy;
}

vec2 applyTransformWithoutTranslation(const ui::Transform& transform, float x, float y) {
    const vec2 transformedXy = transform.transform(x, y);
    const vec2 transformedXy = transform.transform(x, y);
    const vec2 transformedOrigin = transform.transform(0, 0);
    const vec2 transformedOrigin = transform.transform(0, 0);
    return transformedXy - transformedOrigin;
    return transformedXy - transformedOrigin;
}
}


bool shouldDisregardWindowTranslation(uint32_t source) {
bool shouldDisregardTranslation(uint32_t source) {
    // Pointer events are the only type of events that refer to absolute coordinates on the display,
    // Pointer events are the only type of events that refer to absolute coordinates on the display,
    // so we should apply the entire window transform. For other types of events, we should make
    // so we should apply the entire window transform. For other types of events, we should make
    // sure to not apply the window translation/offset.
    // sure to not apply the window translation/offset.
@@ -431,8 +408,7 @@ void MotionEvent::initialize(int32_t id, int32_t deviceId, uint32_t source, int3
                             int32_t buttonState, MotionClassification classification,
                             int32_t buttonState, MotionClassification classification,
                             const ui::Transform& transform, float xPrecision, float yPrecision,
                             const ui::Transform& transform, float xPrecision, float yPrecision,
                             float rawXCursorPosition, float rawYCursorPosition,
                             float rawXCursorPosition, float rawYCursorPosition,
                             uint32_t displayOrientation, int32_t displayWidth,
                             const ui::Transform& rawTransform, nsecs_t downTime, nsecs_t eventTime,
                             int32_t displayHeight, nsecs_t downTime, nsecs_t eventTime,
                             size_t pointerCount, const PointerProperties* pointerProperties,
                             size_t pointerCount, const PointerProperties* pointerProperties,
                             const PointerCoords* pointerCoords) {
                             const PointerCoords* pointerCoords) {
    InputEvent::initialize(id, deviceId, source, displayId, hmac);
    InputEvent::initialize(id, deviceId, source, displayId, hmac);
@@ -448,9 +424,7 @@ void MotionEvent::initialize(int32_t id, int32_t deviceId, uint32_t source, int3
    mYPrecision = yPrecision;
    mYPrecision = yPrecision;
    mRawXCursorPosition = rawXCursorPosition;
    mRawXCursorPosition = rawXCursorPosition;
    mRawYCursorPosition = rawYCursorPosition;
    mRawYCursorPosition = rawYCursorPosition;
    mDisplayOrientation = displayOrientation;
    mRawTransform = rawTransform;
    mDisplayWidth = displayWidth;
    mDisplayHeight = displayHeight;
    mDownTime = downTime;
    mDownTime = downTime;
    mPointerProperties.clear();
    mPointerProperties.clear();
    mPointerProperties.appendArray(pointerProperties, pointerCount);
    mPointerProperties.appendArray(pointerProperties, pointerCount);
@@ -474,9 +448,7 @@ void MotionEvent::copyFrom(const MotionEvent* other, bool keepHistory) {
    mYPrecision = other->mYPrecision;
    mYPrecision = other->mYPrecision;
    mRawXCursorPosition = other->mRawXCursorPosition;
    mRawXCursorPosition = other->mRawXCursorPosition;
    mRawYCursorPosition = other->mRawYCursorPosition;
    mRawYCursorPosition = other->mRawYCursorPosition;
    mDisplayOrientation = other->mDisplayOrientation;
    mRawTransform = other->mRawTransform;
    mDisplayWidth = other->mDisplayWidth;
    mDisplayHeight = other->mDisplayHeight;
    mDownTime = other->mDownTime;
    mDownTime = other->mDownTime;
    mPointerProperties = other->mPointerProperties;
    mPointerProperties = other->mPointerProperties;


@@ -542,20 +514,19 @@ float MotionEvent::getHistoricalRawAxisValue(int32_t axis, size_t pointerIndex,
    if (!isPerWindowInputRotationEnabled()) return coords->getAxisValue(axis);
    if (!isPerWindowInputRotationEnabled()) return coords->getAxisValue(axis);


    if (axis == AMOTION_EVENT_AXIS_X || axis == AMOTION_EVENT_AXIS_Y) {
    if (axis == AMOTION_EVENT_AXIS_X || axis == AMOTION_EVENT_AXIS_Y) {
        // For compatibility, convert raw coordinates into "oriented screen space". Once app
        // For compatibility, convert raw coordinates into logical display space.
        // developers are educated about getRaw, we can consider removing this.
        const vec2 xy = shouldDisregardTranslation(mSource)
        const vec2 xy = shouldDisregardWindowTranslation(mSource)
                ? transformWithoutTranslation(mRawTransform, coords->getX(), coords->getY())
                ? rotatePoint(mDisplayOrientation, coords->getX(), coords->getY())
                : mRawTransform.transform(coords->getX(), coords->getY());
                : rotatePoint(mDisplayOrientation, coords->getX(), coords->getY(), mDisplayWidth,
                              mDisplayHeight);
        static_assert(AMOTION_EVENT_AXIS_X == 0 && AMOTION_EVENT_AXIS_Y == 1);
        static_assert(AMOTION_EVENT_AXIS_X == 0 && AMOTION_EVENT_AXIS_Y == 1);
        return xy[axis];
        return xy[axis];
    }
    }


    if (axis == AMOTION_EVENT_AXIS_RELATIVE_X || axis == AMOTION_EVENT_AXIS_RELATIVE_Y) {
    if (axis == AMOTION_EVENT_AXIS_RELATIVE_X || axis == AMOTION_EVENT_AXIS_RELATIVE_Y) {
        // For compatibility, since we convert raw coordinates into "oriented screen space", we
        // For compatibility, since we report raw coordinates in logical display space, we
        // need to convert the relative axes into the same orientation for consistency.
        // need to convert the relative axes into the same orientation for consistency.
        const vec2 relativeXy = rotatePoint(mDisplayOrientation,
        const vec2 relativeXy =
                transformWithoutTranslation(mRawTransform,
                                            coords->getAxisValue(AMOTION_EVENT_AXIS_RELATIVE_X),
                                            coords->getAxisValue(AMOTION_EVENT_AXIS_RELATIVE_X),
                                            coords->getAxisValue(AMOTION_EVENT_AXIS_RELATIVE_Y));
                                            coords->getAxisValue(AMOTION_EVENT_AXIS_RELATIVE_Y));
        return axis == AMOTION_EVENT_AXIS_RELATIVE_X ? relativeXy.x : relativeXy.y;
        return axis == AMOTION_EVENT_AXIS_RELATIVE_X ? relativeXy.x : relativeXy.y;
@@ -569,8 +540,8 @@ float MotionEvent::getHistoricalAxisValue(int32_t axis, size_t pointerIndex,
    const PointerCoords* coords = getHistoricalRawPointerCoords(pointerIndex, historicalIndex);
    const PointerCoords* coords = getHistoricalRawPointerCoords(pointerIndex, historicalIndex);


    if (axis == AMOTION_EVENT_AXIS_X || axis == AMOTION_EVENT_AXIS_Y) {
    if (axis == AMOTION_EVENT_AXIS_X || axis == AMOTION_EVENT_AXIS_Y) {
        const vec2 xy = shouldDisregardWindowTranslation(mSource)
        const vec2 xy = shouldDisregardTranslation(mSource)
                ? applyTransformWithoutTranslation(mTransform, coords->getX(), coords->getY())
                ? transformWithoutTranslation(mTransform, coords->getX(), coords->getY())
                : mTransform.transform(coords->getXYValue());
                : mTransform.transform(coords->getXYValue());
        static_assert(AMOTION_EVENT_AXIS_X == 0 && AMOTION_EVENT_AXIS_Y == 1);
        static_assert(AMOTION_EVENT_AXIS_X == 0 && AMOTION_EVENT_AXIS_Y == 1);
        return xy[axis];
        return xy[axis];
@@ -578,11 +549,9 @@ float MotionEvent::getHistoricalAxisValue(int32_t axis, size_t pointerIndex,


    if (axis == AMOTION_EVENT_AXIS_RELATIVE_X || axis == AMOTION_EVENT_AXIS_RELATIVE_Y) {
    if (axis == AMOTION_EVENT_AXIS_RELATIVE_X || axis == AMOTION_EVENT_AXIS_RELATIVE_Y) {
        const vec2 relativeXy =
        const vec2 relativeXy =
                applyTransformWithoutTranslation(mTransform,
                transformWithoutTranslation(mTransform,
                                                 coords->getAxisValue(
                                            coords->getAxisValue(AMOTION_EVENT_AXIS_RELATIVE_X),
                                                         AMOTION_EVENT_AXIS_RELATIVE_X),
                                            coords->getAxisValue(AMOTION_EVENT_AXIS_RELATIVE_Y));
                                                 coords->getAxisValue(
                                                         AMOTION_EVENT_AXIS_RELATIVE_Y));
        return axis == AMOTION_EVENT_AXIS_RELATIVE_X ? relativeXy.x : relativeXy.y;
        return axis == AMOTION_EVENT_AXIS_RELATIVE_X ? relativeXy.x : relativeXy.y;
    }
    }


@@ -607,6 +576,8 @@ void MotionEvent::offsetLocation(float xOffset, float yOffset) {


void MotionEvent::scale(float globalScaleFactor) {
void MotionEvent::scale(float globalScaleFactor) {
    mTransform.set(mTransform.tx() * globalScaleFactor, mTransform.ty() * globalScaleFactor);
    mTransform.set(mTransform.tx() * globalScaleFactor, mTransform.ty() * globalScaleFactor);
    mRawTransform.set(mRawTransform.tx() * globalScaleFactor,
                      mRawTransform.ty() * globalScaleFactor);
    mXPrecision *= globalScaleFactor;
    mXPrecision *= globalScaleFactor;
    mYPrecision *= globalScaleFactor;
    mYPrecision *= globalScaleFactor;


@@ -708,9 +679,11 @@ status_t MotionEvent::readFromParcel(Parcel* parcel) {
    mYPrecision = parcel->readFloat();
    mYPrecision = parcel->readFloat();
    mRawXCursorPosition = parcel->readFloat();
    mRawXCursorPosition = parcel->readFloat();
    mRawYCursorPosition = parcel->readFloat();
    mRawYCursorPosition = parcel->readFloat();
    mDisplayOrientation = parcel->readUint32();

    mDisplayWidth = parcel->readInt32();
    result = android::readFromParcel(mRawTransform, *parcel);
    mDisplayHeight = parcel->readInt32();
    if (result != OK) {
        return result;
    }
    mDownTime = parcel->readInt64();
    mDownTime = parcel->readInt64();


    mPointerProperties.clear();
    mPointerProperties.clear();
@@ -770,9 +743,11 @@ status_t MotionEvent::writeToParcel(Parcel* parcel) const {
    parcel->writeFloat(mYPrecision);
    parcel->writeFloat(mYPrecision);
    parcel->writeFloat(mRawXCursorPosition);
    parcel->writeFloat(mRawXCursorPosition);
    parcel->writeFloat(mRawYCursorPosition);
    parcel->writeFloat(mRawYCursorPosition);
    parcel->writeUint32(mDisplayOrientation);

    parcel->writeInt32(mDisplayWidth);
    result = android::writeToParcel(mRawTransform, *parcel);
    parcel->writeInt32(mDisplayHeight);
    if (result != OK) {
        return result;
    }
    parcel->writeInt64(mDownTime);
    parcel->writeInt64(mDownTime);


    for (size_t i = 0; i < pointerCount; i++) {
    for (size_t i = 0; i < pointerCount; i++) {
+24 −16
Original line number Original line Diff line number Diff line
@@ -203,6 +203,8 @@ void InputMessage::getSanitizedCopy(InputMessage* msg) const {
        case InputMessage::Type::MOTION: {
        case InputMessage::Type::MOTION: {
            // int32_t eventId
            // int32_t eventId
            msg->body.motion.eventId = body.motion.eventId;
            msg->body.motion.eventId = body.motion.eventId;
            // uint32_t pointerCount
            msg->body.motion.pointerCount = body.motion.pointerCount;
            // nsecs_t eventTime
            // nsecs_t eventTime
            msg->body.motion.eventTime = body.motion.eventTime;
            msg->body.motion.eventTime = body.motion.eventTime;
            // int32_t deviceId
            // int32_t deviceId
@@ -245,14 +247,14 @@ void InputMessage::getSanitizedCopy(InputMessage* msg) const {
            msg->body.motion.xCursorPosition = body.motion.xCursorPosition;
            msg->body.motion.xCursorPosition = body.motion.xCursorPosition;
            // float yCursorPosition
            // float yCursorPosition
            msg->body.motion.yCursorPosition = body.motion.yCursorPosition;
            msg->body.motion.yCursorPosition = body.motion.yCursorPosition;
            // uint32_t displayOrientation

            msg->body.motion.displayOrientation = body.motion.displayOrientation;
            msg->body.motion.dsdxRaw = body.motion.dsdxRaw;
            // int32_t displayWidth
            msg->body.motion.dtdxRaw = body.motion.dtdxRaw;
            msg->body.motion.displayWidth = body.motion.displayWidth;
            msg->body.motion.dtdyRaw = body.motion.dtdyRaw;
            // int32_t displayHeight
            msg->body.motion.dsdyRaw = body.motion.dsdyRaw;
            msg->body.motion.displayHeight = body.motion.displayHeight;
            msg->body.motion.txRaw = body.motion.txRaw;
            // uint32_t pointerCount
            msg->body.motion.tyRaw = body.motion.tyRaw;
            msg->body.motion.pointerCount = body.motion.pointerCount;

            //struct Pointer pointers[MAX_POINTERS]
            //struct Pointer pointers[MAX_POINTERS]
            for (size_t i = 0; i < body.motion.pointerCount; i++) {
            for (size_t i = 0; i < body.motion.pointerCount; i++) {
                // PointerProperties properties
                // PointerProperties properties
@@ -542,8 +544,8 @@ status_t InputPublisher::publishMotionEvent(
        std::array<uint8_t, 32> hmac, int32_t action, int32_t actionButton, int32_t flags,
        std::array<uint8_t, 32> hmac, int32_t action, int32_t actionButton, int32_t flags,
        int32_t edgeFlags, int32_t metaState, int32_t buttonState,
        int32_t edgeFlags, int32_t metaState, int32_t buttonState,
        MotionClassification classification, const ui::Transform& transform, float xPrecision,
        MotionClassification classification, const ui::Transform& transform, float xPrecision,
        float yPrecision, float xCursorPosition, float yCursorPosition, uint32_t displayOrientation,
        float yPrecision, float xCursorPosition, float yCursorPosition,
        int32_t displayWidth, int32_t displayHeight, nsecs_t downTime, nsecs_t eventTime,
        const ui::Transform& rawTransform, nsecs_t downTime, nsecs_t eventTime,
        uint32_t pointerCount, const PointerProperties* pointerProperties,
        uint32_t pointerCount, const PointerProperties* pointerProperties,
        const PointerCoords* pointerCoords) {
        const PointerCoords* pointerCoords) {
    if (ATRACE_ENABLED()) {
    if (ATRACE_ENABLED()) {
@@ -603,9 +605,12 @@ status_t InputPublisher::publishMotionEvent(
    msg.body.motion.yPrecision = yPrecision;
    msg.body.motion.yPrecision = yPrecision;
    msg.body.motion.xCursorPosition = xCursorPosition;
    msg.body.motion.xCursorPosition = xCursorPosition;
    msg.body.motion.yCursorPosition = yCursorPosition;
    msg.body.motion.yCursorPosition = yCursorPosition;
    msg.body.motion.displayOrientation = displayOrientation;
    msg.body.motion.dsdxRaw = rawTransform.dsdx();
    msg.body.motion.displayWidth = displayWidth;
    msg.body.motion.dtdxRaw = rawTransform.dtdx();
    msg.body.motion.displayHeight = displayHeight;
    msg.body.motion.dtdyRaw = rawTransform.dtdy();
    msg.body.motion.dsdyRaw = rawTransform.dsdy();
    msg.body.motion.txRaw = rawTransform.tx();
    msg.body.motion.tyRaw = rawTransform.ty();
    msg.body.motion.downTime = downTime;
    msg.body.motion.downTime = downTime;
    msg.body.motion.eventTime = eventTime;
    msg.body.motion.eventTime = eventTime;
    msg.body.motion.pointerCount = pointerCount;
    msg.body.motion.pointerCount = pointerCount;
@@ -1391,6 +1396,10 @@ void InputConsumer::initializeMotionEvent(MotionEvent* event, const InputMessage
    ui::Transform transform;
    ui::Transform transform;
    transform.set({msg->body.motion.dsdx, msg->body.motion.dtdx, msg->body.motion.tx,
    transform.set({msg->body.motion.dsdx, msg->body.motion.dtdx, msg->body.motion.tx,
                   msg->body.motion.dtdy, msg->body.motion.dsdy, msg->body.motion.ty, 0, 0, 1});
                   msg->body.motion.dtdy, msg->body.motion.dsdy, msg->body.motion.ty, 0, 0, 1});
    ui::Transform displayTransform;
    displayTransform.set({msg->body.motion.dsdxRaw, msg->body.motion.dtdxRaw,
                          msg->body.motion.txRaw, msg->body.motion.dtdyRaw,
                          msg->body.motion.dsdyRaw, msg->body.motion.tyRaw, 0, 0, 1});
    event->initialize(msg->body.motion.eventId, msg->body.motion.deviceId, msg->body.motion.source,
    event->initialize(msg->body.motion.eventId, msg->body.motion.deviceId, msg->body.motion.source,
                      msg->body.motion.displayId, msg->body.motion.hmac, msg->body.motion.action,
                      msg->body.motion.displayId, msg->body.motion.hmac, msg->body.motion.action,
                      msg->body.motion.actionButton, msg->body.motion.flags,
                      msg->body.motion.actionButton, msg->body.motion.flags,
@@ -1398,9 +1407,8 @@ void InputConsumer::initializeMotionEvent(MotionEvent* event, const InputMessage
                      msg->body.motion.buttonState, msg->body.motion.classification, transform,
                      msg->body.motion.buttonState, msg->body.motion.classification, transform,
                      msg->body.motion.xPrecision, msg->body.motion.yPrecision,
                      msg->body.motion.xPrecision, msg->body.motion.yPrecision,
                      msg->body.motion.xCursorPosition, msg->body.motion.yCursorPosition,
                      msg->body.motion.xCursorPosition, msg->body.motion.yCursorPosition,
                      msg->body.motion.displayOrientation, msg->body.motion.displayWidth,
                      displayTransform, msg->body.motion.downTime, msg->body.motion.eventTime,
                      msg->body.motion.displayHeight, msg->body.motion.downTime,
                      pointerCount, pointerProperties, pointerCoords);
                      msg->body.motion.eventTime, pointerCount, pointerProperties, pointerCoords);
}
}


void InputConsumer::initializeTouchModeEvent(TouchModeEvent* event, const InputMessage* msg) {
void InputConsumer::initializeTouchModeEvent(TouchModeEvent* event, const InputMessage* msg) {
+89 −127

File changed.

Preview size limit exceeded, changes collapsed.

Loading