Loading services/inputflinger/InputDispatcher.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -2691,7 +2691,7 @@ void InputDispatcher::notifyMotion(const NotifyMotionArgs* args) { event.initialize(args->deviceId, args->source, args->displayId, args->action, args->actionButton, args->flags, args->edgeFlags, args->metaState, args->buttonState, MotionClassification::NONE, 0, 0, args->xPrecision, args->yPrecision, args->classification, 0, 0, args->xPrecision, args->yPrecision, args->downTime, args->eventTime, args->pointerCount, args->pointerProperties, args->pointerCoords); Loading services/inputflinger/InputListener.cpp +4 −4 Original line number Diff line number Diff line Loading @@ -71,8 +71,8 @@ void NotifyKeyArgs::notify(const sp<InputListenerInterface>& listener) const { NotifyMotionArgs::NotifyMotionArgs(uint32_t sequenceNum, nsecs_t eventTime, int32_t deviceId, uint32_t source, int32_t displayId, uint32_t policyFlags, int32_t action, int32_t actionButton, int32_t flags, int32_t metaState, int32_t buttonState, int32_t edgeFlags, uint32_t deviceTimestamp, uint32_t pointerCount, int32_t buttonState, MotionClassification classification, int32_t edgeFlags, uint32_t deviceTimestamp, uint32_t pointerCount, const PointerProperties* pointerProperties, const PointerCoords* pointerCoords, float xPrecision, float yPrecision, nsecs_t downTime, const std::vector<TouchVideoFrame>& videoFrames) : Loading @@ -80,7 +80,7 @@ NotifyMotionArgs::NotifyMotionArgs(uint32_t sequenceNum, nsecs_t eventTime, int3 displayId(displayId), policyFlags(policyFlags), action(action), actionButton(actionButton), flags(flags), metaState(metaState), buttonState(buttonState), edgeFlags(edgeFlags), deviceTimestamp(deviceTimestamp), classification(classification), edgeFlags(edgeFlags), deviceTimestamp(deviceTimestamp), pointerCount(pointerCount), xPrecision(xPrecision), yPrecision(yPrecision), downTime(downTime), videoFrames(videoFrames) { Loading @@ -95,7 +95,7 @@ NotifyMotionArgs::NotifyMotionArgs(const NotifyMotionArgs& other) : source(other.source), displayId(other.displayId), policyFlags(other.policyFlags), action(other.action), actionButton(other.actionButton), flags(other.flags), metaState(other.metaState), buttonState(other.buttonState), edgeFlags(other.edgeFlags), classification(other.classification), edgeFlags(other.edgeFlags), deviceTimestamp(other.deviceTimestamp), pointerCount(other.pointerCount), xPrecision(other.xPrecision), yPrecision(other.yPrecision), downTime(other.downTime), videoFrames(other.videoFrames) { Loading services/inputflinger/InputReader.cpp +30 −26 Original line number Diff line number Diff line Loading @@ -2834,7 +2834,8 @@ void CursorInputMapper::sync(nsecs_t when) { NotifyMotionArgs releaseArgs(mContext->getNextSequenceNum(), when, getDeviceId(), mSource, displayId, policyFlags, AMOTION_EVENT_ACTION_BUTTON_RELEASE, actionButton, 0, metaState, buttonState, AMOTION_EVENT_EDGE_FLAG_NONE, metaState, buttonState, MotionClassification::NONE, AMOTION_EVENT_EDGE_FLAG_NONE, /* deviceTimestamp */ 0, 1, &pointerProperties, &pointerCoords, mXPrecision, mYPrecision, downTime, /* videoFrames */ {}); getListener()->notifyMotion(&releaseArgs); Loading @@ -2843,7 +2844,7 @@ void CursorInputMapper::sync(nsecs_t when) { NotifyMotionArgs args(mContext->getNextSequenceNum(), when, getDeviceId(), mSource, displayId, policyFlags, motionEventAction, 0, 0, metaState, currentButtonState, AMOTION_EVENT_EDGE_FLAG_NONE, MotionClassification::NONE, AMOTION_EVENT_EDGE_FLAG_NONE, /* deviceTimestamp */ 0, 1, &pointerProperties, &pointerCoords, mXPrecision, mYPrecision, downTime, /* videoFrames */ {}); getListener()->notifyMotion(&args); Loading @@ -2855,7 +2856,8 @@ void CursorInputMapper::sync(nsecs_t when) { buttonState |= actionButton; NotifyMotionArgs pressArgs(mContext->getNextSequenceNum(), when, getDeviceId(), mSource, displayId, policyFlags, AMOTION_EVENT_ACTION_BUTTON_PRESS, actionButton, 0, metaState, buttonState, AMOTION_EVENT_EDGE_FLAG_NONE, actionButton, 0, metaState, buttonState, MotionClassification::NONE, AMOTION_EVENT_EDGE_FLAG_NONE, /* deviceTimestamp */ 0, 1, &pointerProperties, &pointerCoords, mXPrecision, mYPrecision, downTime, /* videoFrames */ {}); getListener()->notifyMotion(&pressArgs); Loading @@ -2869,7 +2871,8 @@ void CursorInputMapper::sync(nsecs_t when) { && (mSource == AINPUT_SOURCE_MOUSE)) { NotifyMotionArgs hoverArgs(mContext->getNextSequenceNum(), when, getDeviceId(), mSource, displayId, policyFlags, AMOTION_EVENT_ACTION_HOVER_MOVE, 0, 0, metaState, currentButtonState, AMOTION_EVENT_EDGE_FLAG_NONE, metaState, currentButtonState, MotionClassification::NONE, AMOTION_EVENT_EDGE_FLAG_NONE, /* deviceTimestamp */ 0, 1, &pointerProperties, &pointerCoords, mXPrecision, mYPrecision, downTime, /* videoFrames */ {}); getListener()->notifyMotion(&hoverArgs); Loading @@ -2883,7 +2886,7 @@ void CursorInputMapper::sync(nsecs_t when) { NotifyMotionArgs scrollArgs(mContext->getNextSequenceNum(), when, getDeviceId(), mSource, displayId, policyFlags, AMOTION_EVENT_ACTION_SCROLL, 0, 0, metaState, currentButtonState, AMOTION_EVENT_EDGE_FLAG_NONE, MotionClassification::NONE, AMOTION_EVENT_EDGE_FLAG_NONE, /* deviceTimestamp */ 0, 1, &pointerProperties, &pointerCoords, mXPrecision, mYPrecision, downTime, /* videoFrames */ {}); getListener()->notifyMotion(&scrollArgs); Loading Loading @@ -3014,8 +3017,8 @@ void RotaryEncoderInputMapper::sync(nsecs_t when) { NotifyMotionArgs scrollArgs(mContext->getNextSequenceNum(), when, getDeviceId(), mSource, displayId, policyFlags, AMOTION_EVENT_ACTION_SCROLL, 0, 0, metaState, 0, AMOTION_EVENT_EDGE_FLAG_NONE, AMOTION_EVENT_ACTION_SCROLL, 0, 0, metaState, /* buttonState */ 0, MotionClassification::NONE, AMOTION_EVENT_EDGE_FLAG_NONE, /* deviceTimestamp */ 0, 1, &pointerProperties, &pointerCoords, 0, 0, 0, /* videoFrames */ {}); getListener()->notifyMotion(&scrollArgs); Loading Loading @@ -5413,7 +5416,7 @@ void TouchInputMapper::dispatchPointerGestures(nsecs_t when, uint32_t policyFlag NotifyMotionArgs args(mContext->getNextSequenceNum(), when, getDeviceId(), mSource, displayId, policyFlags, AMOTION_EVENT_ACTION_HOVER_MOVE, 0, 0, metaState, buttonState, AMOTION_EVENT_EDGE_FLAG_NONE, metaState, buttonState, MotionClassification::NONE, AMOTION_EVENT_EDGE_FLAG_NONE, /* deviceTimestamp */ 0, 1, &pointerProperties, &pointerCoords, 0, 0, mPointerGesture.downTime, /* videoFrames */ {}); getListener()->notifyMotion(&args); Loading Loading @@ -6338,8 +6341,8 @@ void TouchInputMapper::dispatchPointerSimple(nsecs_t when, uint32_t policyFlags, // Send up. NotifyMotionArgs args(mContext->getNextSequenceNum(), when, getDeviceId(), mSource, displayId, policyFlags, AMOTION_EVENT_ACTION_UP, 0, 0, metaState, mLastRawState.buttonState, 0, /* deviceTimestamp */ 0, AMOTION_EVENT_ACTION_UP, 0, 0, metaState, mLastRawState.buttonState, MotionClassification::NONE, AMOTION_EVENT_EDGE_FLAG_NONE, /* deviceTimestamp */ 0, 1, &mPointerSimple.lastProperties, &mPointerSimple.lastCoords, mOrientedXPrecision, mOrientedYPrecision, mPointerSimple.downTime, /* videoFrames */ {}); Loading @@ -6352,8 +6355,8 @@ void TouchInputMapper::dispatchPointerSimple(nsecs_t when, uint32_t policyFlags, // Send hover exit. NotifyMotionArgs args(mContext->getNextSequenceNum(), when, getDeviceId(), mSource, displayId, policyFlags, AMOTION_EVENT_ACTION_HOVER_EXIT, 0, 0, metaState, mLastRawState.buttonState, 0, /* deviceTimestamp */ 0, AMOTION_EVENT_ACTION_HOVER_EXIT, 0, 0, metaState, mLastRawState.buttonState, MotionClassification::NONE, AMOTION_EVENT_EDGE_FLAG_NONE, /* deviceTimestamp */ 0, 1, &mPointerSimple.lastProperties, &mPointerSimple.lastCoords, mOrientedXPrecision, mOrientedYPrecision, mPointerSimple.downTime, /* videoFrames */ {}); Loading @@ -6368,7 +6371,8 @@ void TouchInputMapper::dispatchPointerSimple(nsecs_t when, uint32_t policyFlags, // Send down. NotifyMotionArgs args(mContext->getNextSequenceNum(), when, getDeviceId(), mSource, displayId, policyFlags, AMOTION_EVENT_ACTION_DOWN, 0, 0, metaState, mCurrentRawState.buttonState, 0, AMOTION_EVENT_ACTION_DOWN, 0, 0, metaState, mCurrentRawState.buttonState, MotionClassification::NONE, AMOTION_EVENT_EDGE_FLAG_NONE, /* deviceTimestamp */ 0, 1, &mPointerSimple.currentProperties, &mPointerSimple.currentCoords, mOrientedXPrecision, mOrientedYPrecision, Loading @@ -6379,8 +6383,8 @@ void TouchInputMapper::dispatchPointerSimple(nsecs_t when, uint32_t policyFlags, // Send move. NotifyMotionArgs args(mContext->getNextSequenceNum(), when, getDeviceId(), mSource, displayId, policyFlags, AMOTION_EVENT_ACTION_MOVE, 0, 0, metaState, mCurrentRawState.buttonState, 0, /* deviceTimestamp */ 0, AMOTION_EVENT_ACTION_MOVE, 0, 0, metaState, mCurrentRawState.buttonState, MotionClassification::NONE, AMOTION_EVENT_EDGE_FLAG_NONE, /* deviceTimestamp */ 0, 1, &mPointerSimple.currentProperties, &mPointerSimple.currentCoords, mOrientedXPrecision, mOrientedYPrecision, mPointerSimple.downTime, /* videoFrames */ {}); Loading @@ -6395,8 +6399,8 @@ void TouchInputMapper::dispatchPointerSimple(nsecs_t when, uint32_t policyFlags, NotifyMotionArgs args(mContext->getNextSequenceNum(), when, getDeviceId(), mSource, displayId, policyFlags, AMOTION_EVENT_ACTION_HOVER_ENTER, 0, 0, metaState, mCurrentRawState.buttonState, 0, /* deviceTimestamp */ 0, mCurrentRawState.buttonState, MotionClassification::NONE, AMOTION_EVENT_EDGE_FLAG_NONE, /* deviceTimestamp */ 0, 1, &mPointerSimple.currentProperties, &mPointerSimple.currentCoords, mOrientedXPrecision, mOrientedYPrecision, mPointerSimple.downTime, /* videoFrames */ {}); Loading @@ -6407,8 +6411,8 @@ void TouchInputMapper::dispatchPointerSimple(nsecs_t when, uint32_t policyFlags, NotifyMotionArgs args(mContext->getNextSequenceNum(), when, getDeviceId(), mSource, displayId, policyFlags, AMOTION_EVENT_ACTION_HOVER_MOVE, 0, 0, metaState, mCurrentRawState.buttonState, 0, /* deviceTimestamp */ 0, mCurrentRawState.buttonState, MotionClassification::NONE, AMOTION_EVENT_EDGE_FLAG_NONE, /* deviceTimestamp */ 0, 1, &mPointerSimple.currentProperties, &mPointerSimple.currentCoords, mOrientedXPrecision, mOrientedYPrecision, mPointerSimple.downTime, /* videoFrames */ {}); Loading @@ -6429,8 +6433,8 @@ void TouchInputMapper::dispatchPointerSimple(nsecs_t when, uint32_t policyFlags, NotifyMotionArgs args(mContext->getNextSequenceNum(), when, getDeviceId(), mSource, displayId, policyFlags, AMOTION_EVENT_ACTION_SCROLL, 0, 0, metaState, mCurrentRawState.buttonState, 0, /* deviceTimestamp */ 0, AMOTION_EVENT_ACTION_SCROLL, 0, 0, metaState, mCurrentRawState.buttonState, MotionClassification::NONE, AMOTION_EVENT_EDGE_FLAG_NONE, /* deviceTimestamp */ 0, 1, &mPointerSimple.currentProperties, &pointerCoords, mOrientedXPrecision, mOrientedYPrecision, mPointerSimple.downTime, /* videoFrames */ {}); Loading Loading @@ -6497,8 +6501,8 @@ void TouchInputMapper::dispatchMotion(nsecs_t when, uint32_t policyFlags, uint32 std::vector<TouchVideoFrame> frames = mDevice->getEventHub()->getVideoFrames(deviceId); NotifyMotionArgs args(mContext->getNextSequenceNum(), when, deviceId, source, displayId, policyFlags, action, actionButton, flags, metaState, buttonState, edgeFlags, deviceTimestamp, pointerCount, pointerProperties, pointerCoords, action, actionButton, flags, metaState, buttonState, MotionClassification::NONE, edgeFlags, deviceTimestamp, pointerCount, pointerProperties, pointerCoords, xPrecision, yPrecision, downTime, std::move(frames)); getListener()->notifyMotion(&args); } Loading Loading @@ -7422,9 +7426,9 @@ void JoystickInputMapper::sync(nsecs_t when, bool force) { NotifyMotionArgs args(mContext->getNextSequenceNum(), when, getDeviceId(), AINPUT_SOURCE_JOYSTICK, ADISPLAY_ID_NONE, policyFlags, AMOTION_EVENT_ACTION_MOVE, 0, 0, metaState, buttonState, AMOTION_EVENT_EDGE_FLAG_NONE, /* deviceTimestamp */ 0, 1, &pointerProperties, &pointerCoords, 0, 0, 0, /* videoFrames */ {}); AMOTION_EVENT_ACTION_MOVE, 0, 0, metaState, buttonState, MotionClassification::NONE, AMOTION_EVENT_EDGE_FLAG_NONE, /* deviceTimestamp */ 0, 1, &pointerProperties, &pointerCoords, 0, 0, 0, /* videoFrames */ {}); getListener()->notifyMotion(&args); } Loading services/inputflinger/include/InputListener.h +5 −1 Original line number Diff line number Diff line Loading @@ -99,6 +99,10 @@ struct NotifyMotionArgs : public NotifyArgs { int32_t flags; int32_t metaState; int32_t buttonState; /** * Classification of the current touch gesture */ MotionClassification classification; int32_t edgeFlags; /** * A timestamp in the input device's time base, not the platform's. Loading @@ -120,7 +124,7 @@ struct NotifyMotionArgs : public NotifyArgs { NotifyMotionArgs(uint32_t sequenceNum, nsecs_t eventTime, int32_t deviceId, uint32_t source, int32_t displayId, uint32_t policyFlags, int32_t action, int32_t actionButton, int32_t flags, int32_t metaState, int32_t buttonState, int32_t metaState, int32_t buttonState, MotionClassification classification, int32_t edgeFlags, uint32_t deviceTimestamp, uint32_t pointerCount, const PointerProperties* pointerProperties, const PointerCoords* pointerCoords, float xPrecision, float yPrecision, nsecs_t downTime, Loading Loading
services/inputflinger/InputDispatcher.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -2691,7 +2691,7 @@ void InputDispatcher::notifyMotion(const NotifyMotionArgs* args) { event.initialize(args->deviceId, args->source, args->displayId, args->action, args->actionButton, args->flags, args->edgeFlags, args->metaState, args->buttonState, MotionClassification::NONE, 0, 0, args->xPrecision, args->yPrecision, args->classification, 0, 0, args->xPrecision, args->yPrecision, args->downTime, args->eventTime, args->pointerCount, args->pointerProperties, args->pointerCoords); Loading
services/inputflinger/InputListener.cpp +4 −4 Original line number Diff line number Diff line Loading @@ -71,8 +71,8 @@ void NotifyKeyArgs::notify(const sp<InputListenerInterface>& listener) const { NotifyMotionArgs::NotifyMotionArgs(uint32_t sequenceNum, nsecs_t eventTime, int32_t deviceId, uint32_t source, int32_t displayId, uint32_t policyFlags, int32_t action, int32_t actionButton, int32_t flags, int32_t metaState, int32_t buttonState, int32_t edgeFlags, uint32_t deviceTimestamp, uint32_t pointerCount, int32_t buttonState, MotionClassification classification, int32_t edgeFlags, uint32_t deviceTimestamp, uint32_t pointerCount, const PointerProperties* pointerProperties, const PointerCoords* pointerCoords, float xPrecision, float yPrecision, nsecs_t downTime, const std::vector<TouchVideoFrame>& videoFrames) : Loading @@ -80,7 +80,7 @@ NotifyMotionArgs::NotifyMotionArgs(uint32_t sequenceNum, nsecs_t eventTime, int3 displayId(displayId), policyFlags(policyFlags), action(action), actionButton(actionButton), flags(flags), metaState(metaState), buttonState(buttonState), edgeFlags(edgeFlags), deviceTimestamp(deviceTimestamp), classification(classification), edgeFlags(edgeFlags), deviceTimestamp(deviceTimestamp), pointerCount(pointerCount), xPrecision(xPrecision), yPrecision(yPrecision), downTime(downTime), videoFrames(videoFrames) { Loading @@ -95,7 +95,7 @@ NotifyMotionArgs::NotifyMotionArgs(const NotifyMotionArgs& other) : source(other.source), displayId(other.displayId), policyFlags(other.policyFlags), action(other.action), actionButton(other.actionButton), flags(other.flags), metaState(other.metaState), buttonState(other.buttonState), edgeFlags(other.edgeFlags), classification(other.classification), edgeFlags(other.edgeFlags), deviceTimestamp(other.deviceTimestamp), pointerCount(other.pointerCount), xPrecision(other.xPrecision), yPrecision(other.yPrecision), downTime(other.downTime), videoFrames(other.videoFrames) { Loading
services/inputflinger/InputReader.cpp +30 −26 Original line number Diff line number Diff line Loading @@ -2834,7 +2834,8 @@ void CursorInputMapper::sync(nsecs_t when) { NotifyMotionArgs releaseArgs(mContext->getNextSequenceNum(), when, getDeviceId(), mSource, displayId, policyFlags, AMOTION_EVENT_ACTION_BUTTON_RELEASE, actionButton, 0, metaState, buttonState, AMOTION_EVENT_EDGE_FLAG_NONE, metaState, buttonState, MotionClassification::NONE, AMOTION_EVENT_EDGE_FLAG_NONE, /* deviceTimestamp */ 0, 1, &pointerProperties, &pointerCoords, mXPrecision, mYPrecision, downTime, /* videoFrames */ {}); getListener()->notifyMotion(&releaseArgs); Loading @@ -2843,7 +2844,7 @@ void CursorInputMapper::sync(nsecs_t when) { NotifyMotionArgs args(mContext->getNextSequenceNum(), when, getDeviceId(), mSource, displayId, policyFlags, motionEventAction, 0, 0, metaState, currentButtonState, AMOTION_EVENT_EDGE_FLAG_NONE, MotionClassification::NONE, AMOTION_EVENT_EDGE_FLAG_NONE, /* deviceTimestamp */ 0, 1, &pointerProperties, &pointerCoords, mXPrecision, mYPrecision, downTime, /* videoFrames */ {}); getListener()->notifyMotion(&args); Loading @@ -2855,7 +2856,8 @@ void CursorInputMapper::sync(nsecs_t when) { buttonState |= actionButton; NotifyMotionArgs pressArgs(mContext->getNextSequenceNum(), when, getDeviceId(), mSource, displayId, policyFlags, AMOTION_EVENT_ACTION_BUTTON_PRESS, actionButton, 0, metaState, buttonState, AMOTION_EVENT_EDGE_FLAG_NONE, actionButton, 0, metaState, buttonState, MotionClassification::NONE, AMOTION_EVENT_EDGE_FLAG_NONE, /* deviceTimestamp */ 0, 1, &pointerProperties, &pointerCoords, mXPrecision, mYPrecision, downTime, /* videoFrames */ {}); getListener()->notifyMotion(&pressArgs); Loading @@ -2869,7 +2871,8 @@ void CursorInputMapper::sync(nsecs_t when) { && (mSource == AINPUT_SOURCE_MOUSE)) { NotifyMotionArgs hoverArgs(mContext->getNextSequenceNum(), when, getDeviceId(), mSource, displayId, policyFlags, AMOTION_EVENT_ACTION_HOVER_MOVE, 0, 0, metaState, currentButtonState, AMOTION_EVENT_EDGE_FLAG_NONE, metaState, currentButtonState, MotionClassification::NONE, AMOTION_EVENT_EDGE_FLAG_NONE, /* deviceTimestamp */ 0, 1, &pointerProperties, &pointerCoords, mXPrecision, mYPrecision, downTime, /* videoFrames */ {}); getListener()->notifyMotion(&hoverArgs); Loading @@ -2883,7 +2886,7 @@ void CursorInputMapper::sync(nsecs_t when) { NotifyMotionArgs scrollArgs(mContext->getNextSequenceNum(), when, getDeviceId(), mSource, displayId, policyFlags, AMOTION_EVENT_ACTION_SCROLL, 0, 0, metaState, currentButtonState, AMOTION_EVENT_EDGE_FLAG_NONE, MotionClassification::NONE, AMOTION_EVENT_EDGE_FLAG_NONE, /* deviceTimestamp */ 0, 1, &pointerProperties, &pointerCoords, mXPrecision, mYPrecision, downTime, /* videoFrames */ {}); getListener()->notifyMotion(&scrollArgs); Loading Loading @@ -3014,8 +3017,8 @@ void RotaryEncoderInputMapper::sync(nsecs_t when) { NotifyMotionArgs scrollArgs(mContext->getNextSequenceNum(), when, getDeviceId(), mSource, displayId, policyFlags, AMOTION_EVENT_ACTION_SCROLL, 0, 0, metaState, 0, AMOTION_EVENT_EDGE_FLAG_NONE, AMOTION_EVENT_ACTION_SCROLL, 0, 0, metaState, /* buttonState */ 0, MotionClassification::NONE, AMOTION_EVENT_EDGE_FLAG_NONE, /* deviceTimestamp */ 0, 1, &pointerProperties, &pointerCoords, 0, 0, 0, /* videoFrames */ {}); getListener()->notifyMotion(&scrollArgs); Loading Loading @@ -5413,7 +5416,7 @@ void TouchInputMapper::dispatchPointerGestures(nsecs_t when, uint32_t policyFlag NotifyMotionArgs args(mContext->getNextSequenceNum(), when, getDeviceId(), mSource, displayId, policyFlags, AMOTION_EVENT_ACTION_HOVER_MOVE, 0, 0, metaState, buttonState, AMOTION_EVENT_EDGE_FLAG_NONE, metaState, buttonState, MotionClassification::NONE, AMOTION_EVENT_EDGE_FLAG_NONE, /* deviceTimestamp */ 0, 1, &pointerProperties, &pointerCoords, 0, 0, mPointerGesture.downTime, /* videoFrames */ {}); getListener()->notifyMotion(&args); Loading Loading @@ -6338,8 +6341,8 @@ void TouchInputMapper::dispatchPointerSimple(nsecs_t when, uint32_t policyFlags, // Send up. NotifyMotionArgs args(mContext->getNextSequenceNum(), when, getDeviceId(), mSource, displayId, policyFlags, AMOTION_EVENT_ACTION_UP, 0, 0, metaState, mLastRawState.buttonState, 0, /* deviceTimestamp */ 0, AMOTION_EVENT_ACTION_UP, 0, 0, metaState, mLastRawState.buttonState, MotionClassification::NONE, AMOTION_EVENT_EDGE_FLAG_NONE, /* deviceTimestamp */ 0, 1, &mPointerSimple.lastProperties, &mPointerSimple.lastCoords, mOrientedXPrecision, mOrientedYPrecision, mPointerSimple.downTime, /* videoFrames */ {}); Loading @@ -6352,8 +6355,8 @@ void TouchInputMapper::dispatchPointerSimple(nsecs_t when, uint32_t policyFlags, // Send hover exit. NotifyMotionArgs args(mContext->getNextSequenceNum(), when, getDeviceId(), mSource, displayId, policyFlags, AMOTION_EVENT_ACTION_HOVER_EXIT, 0, 0, metaState, mLastRawState.buttonState, 0, /* deviceTimestamp */ 0, AMOTION_EVENT_ACTION_HOVER_EXIT, 0, 0, metaState, mLastRawState.buttonState, MotionClassification::NONE, AMOTION_EVENT_EDGE_FLAG_NONE, /* deviceTimestamp */ 0, 1, &mPointerSimple.lastProperties, &mPointerSimple.lastCoords, mOrientedXPrecision, mOrientedYPrecision, mPointerSimple.downTime, /* videoFrames */ {}); Loading @@ -6368,7 +6371,8 @@ void TouchInputMapper::dispatchPointerSimple(nsecs_t when, uint32_t policyFlags, // Send down. NotifyMotionArgs args(mContext->getNextSequenceNum(), when, getDeviceId(), mSource, displayId, policyFlags, AMOTION_EVENT_ACTION_DOWN, 0, 0, metaState, mCurrentRawState.buttonState, 0, AMOTION_EVENT_ACTION_DOWN, 0, 0, metaState, mCurrentRawState.buttonState, MotionClassification::NONE, AMOTION_EVENT_EDGE_FLAG_NONE, /* deviceTimestamp */ 0, 1, &mPointerSimple.currentProperties, &mPointerSimple.currentCoords, mOrientedXPrecision, mOrientedYPrecision, Loading @@ -6379,8 +6383,8 @@ void TouchInputMapper::dispatchPointerSimple(nsecs_t when, uint32_t policyFlags, // Send move. NotifyMotionArgs args(mContext->getNextSequenceNum(), when, getDeviceId(), mSource, displayId, policyFlags, AMOTION_EVENT_ACTION_MOVE, 0, 0, metaState, mCurrentRawState.buttonState, 0, /* deviceTimestamp */ 0, AMOTION_EVENT_ACTION_MOVE, 0, 0, metaState, mCurrentRawState.buttonState, MotionClassification::NONE, AMOTION_EVENT_EDGE_FLAG_NONE, /* deviceTimestamp */ 0, 1, &mPointerSimple.currentProperties, &mPointerSimple.currentCoords, mOrientedXPrecision, mOrientedYPrecision, mPointerSimple.downTime, /* videoFrames */ {}); Loading @@ -6395,8 +6399,8 @@ void TouchInputMapper::dispatchPointerSimple(nsecs_t when, uint32_t policyFlags, NotifyMotionArgs args(mContext->getNextSequenceNum(), when, getDeviceId(), mSource, displayId, policyFlags, AMOTION_EVENT_ACTION_HOVER_ENTER, 0, 0, metaState, mCurrentRawState.buttonState, 0, /* deviceTimestamp */ 0, mCurrentRawState.buttonState, MotionClassification::NONE, AMOTION_EVENT_EDGE_FLAG_NONE, /* deviceTimestamp */ 0, 1, &mPointerSimple.currentProperties, &mPointerSimple.currentCoords, mOrientedXPrecision, mOrientedYPrecision, mPointerSimple.downTime, /* videoFrames */ {}); Loading @@ -6407,8 +6411,8 @@ void TouchInputMapper::dispatchPointerSimple(nsecs_t when, uint32_t policyFlags, NotifyMotionArgs args(mContext->getNextSequenceNum(), when, getDeviceId(), mSource, displayId, policyFlags, AMOTION_EVENT_ACTION_HOVER_MOVE, 0, 0, metaState, mCurrentRawState.buttonState, 0, /* deviceTimestamp */ 0, mCurrentRawState.buttonState, MotionClassification::NONE, AMOTION_EVENT_EDGE_FLAG_NONE, /* deviceTimestamp */ 0, 1, &mPointerSimple.currentProperties, &mPointerSimple.currentCoords, mOrientedXPrecision, mOrientedYPrecision, mPointerSimple.downTime, /* videoFrames */ {}); Loading @@ -6429,8 +6433,8 @@ void TouchInputMapper::dispatchPointerSimple(nsecs_t when, uint32_t policyFlags, NotifyMotionArgs args(mContext->getNextSequenceNum(), when, getDeviceId(), mSource, displayId, policyFlags, AMOTION_EVENT_ACTION_SCROLL, 0, 0, metaState, mCurrentRawState.buttonState, 0, /* deviceTimestamp */ 0, AMOTION_EVENT_ACTION_SCROLL, 0, 0, metaState, mCurrentRawState.buttonState, MotionClassification::NONE, AMOTION_EVENT_EDGE_FLAG_NONE, /* deviceTimestamp */ 0, 1, &mPointerSimple.currentProperties, &pointerCoords, mOrientedXPrecision, mOrientedYPrecision, mPointerSimple.downTime, /* videoFrames */ {}); Loading Loading @@ -6497,8 +6501,8 @@ void TouchInputMapper::dispatchMotion(nsecs_t when, uint32_t policyFlags, uint32 std::vector<TouchVideoFrame> frames = mDevice->getEventHub()->getVideoFrames(deviceId); NotifyMotionArgs args(mContext->getNextSequenceNum(), when, deviceId, source, displayId, policyFlags, action, actionButton, flags, metaState, buttonState, edgeFlags, deviceTimestamp, pointerCount, pointerProperties, pointerCoords, action, actionButton, flags, metaState, buttonState, MotionClassification::NONE, edgeFlags, deviceTimestamp, pointerCount, pointerProperties, pointerCoords, xPrecision, yPrecision, downTime, std::move(frames)); getListener()->notifyMotion(&args); } Loading Loading @@ -7422,9 +7426,9 @@ void JoystickInputMapper::sync(nsecs_t when, bool force) { NotifyMotionArgs args(mContext->getNextSequenceNum(), when, getDeviceId(), AINPUT_SOURCE_JOYSTICK, ADISPLAY_ID_NONE, policyFlags, AMOTION_EVENT_ACTION_MOVE, 0, 0, metaState, buttonState, AMOTION_EVENT_EDGE_FLAG_NONE, /* deviceTimestamp */ 0, 1, &pointerProperties, &pointerCoords, 0, 0, 0, /* videoFrames */ {}); AMOTION_EVENT_ACTION_MOVE, 0, 0, metaState, buttonState, MotionClassification::NONE, AMOTION_EVENT_EDGE_FLAG_NONE, /* deviceTimestamp */ 0, 1, &pointerProperties, &pointerCoords, 0, 0, 0, /* videoFrames */ {}); getListener()->notifyMotion(&args); } Loading
services/inputflinger/include/InputListener.h +5 −1 Original line number Diff line number Diff line Loading @@ -99,6 +99,10 @@ struct NotifyMotionArgs : public NotifyArgs { int32_t flags; int32_t metaState; int32_t buttonState; /** * Classification of the current touch gesture */ MotionClassification classification; int32_t edgeFlags; /** * A timestamp in the input device's time base, not the platform's. Loading @@ -120,7 +124,7 @@ struct NotifyMotionArgs : public NotifyArgs { NotifyMotionArgs(uint32_t sequenceNum, nsecs_t eventTime, int32_t deviceId, uint32_t source, int32_t displayId, uint32_t policyFlags, int32_t action, int32_t actionButton, int32_t flags, int32_t metaState, int32_t buttonState, int32_t metaState, int32_t buttonState, MotionClassification classification, int32_t edgeFlags, uint32_t deviceTimestamp, uint32_t pointerCount, const PointerProperties* pointerProperties, const PointerCoords* pointerCoords, float xPrecision, float yPrecision, nsecs_t downTime, Loading