Loading include/android/input.h +8 −0 Original line number Diff line number Diff line Loading @@ -305,6 +305,12 @@ enum { /* The pointer is not down but has exited the boundaries of a window or view. */ AMOTION_EVENT_ACTION_HOVER_EXIT = 10, /* One or more buttons have been pressed. */ AMOTION_EVENT_ACTION_BUTTON_PRESS = 11, /* One or more buttons have been released. */ AMOTION_EVENT_ACTION_BUTTON_RELEASE = 12, }; /* Loading Loading @@ -405,6 +411,8 @@ enum { AMOTION_EVENT_BUTTON_TERTIARY = 1 << 2, AMOTION_EVENT_BUTTON_BACK = 1 << 3, AMOTION_EVENT_BUTTON_FORWARD = 1 << 4, AMOTION_EVENT_BUTTON_STYLUS_PRIMARY = 1 << 5, AMOTION_EVENT_BUTTON_STYLUS_SECONDARY = 1 << 6, }; /* Loading include/input/Input.h +6 −0 Original line number Diff line number Diff line Loading @@ -379,6 +379,10 @@ public: inline int32_t getButtonState() const { return mButtonState; } inline int32_t setButtonState(int32_t buttonState) { mButtonState = buttonState; } inline int32_t getActionButton() const { return mActionButton; } inline float getXOffset() const { return mXOffset; } inline float getYOffset() const { return mYOffset; } Loading Loading @@ -532,6 +536,7 @@ public: int32_t deviceId, int32_t source, int32_t action, int32_t actionButton, int32_t flags, int32_t edgeFlags, int32_t metaState, Loading Loading @@ -584,6 +589,7 @@ public: protected: int32_t mAction; int32_t mActionButton; int32_t mFlags; int32_t mEdgeFlags; int32_t mMetaState; Loading include/input/InputTransport.h +2 −0 Original line number Diff line number Diff line Loading @@ -84,6 +84,7 @@ struct InputMessage { int32_t deviceId; int32_t source; int32_t action; int32_t actionButton; int32_t flags; int32_t metaState; int32_t buttonState; Loading Loading @@ -232,6 +233,7 @@ public: int32_t deviceId, int32_t source, int32_t action, int32_t actionButton, int32_t flags, int32_t edgeFlags, int32_t metaState, Loading libs/input/Input.cpp +5 −0 Original line number Diff line number Diff line Loading @@ -216,6 +216,7 @@ void MotionEvent::initialize( int32_t deviceId, int32_t source, int32_t action, int32_t actionButton, int32_t flags, int32_t edgeFlags, int32_t metaState, Loading @@ -231,6 +232,7 @@ void MotionEvent::initialize( const PointerCoords* pointerCoords) { InputEvent::initialize(deviceId, source); mAction = action; mActionButton = actionButton; mFlags = flags; mEdgeFlags = edgeFlags; mMetaState = metaState; Loading @@ -250,6 +252,7 @@ void MotionEvent::initialize( void MotionEvent::copyFrom(const MotionEvent* other, bool keepHistory) { InputEvent::initialize(other->mDeviceId, other->mSource); mAction = other->mAction; mActionButton = other->mActionButton; mFlags = other->mFlags; mEdgeFlags = other->mEdgeFlags; mMetaState = other->mMetaState; Loading Loading @@ -428,6 +431,7 @@ status_t MotionEvent::readFromParcel(Parcel* parcel) { mDeviceId = parcel->readInt32(); mSource = parcel->readInt32(); mAction = parcel->readInt32(); mActionButton = parcel->readInt32(); mFlags = parcel->readInt32(); mEdgeFlags = parcel->readInt32(); mMetaState = parcel->readInt32(); Loading Loading @@ -475,6 +479,7 @@ status_t MotionEvent::writeToParcel(Parcel* parcel) const { parcel->writeInt32(mDeviceId); parcel->writeInt32(mSource); parcel->writeInt32(mAction); parcel->writeInt32(mActionButton); parcel->writeInt32(mFlags); parcel->writeInt32(mEdgeFlags); parcel->writeInt32(mMetaState); Loading libs/input/InputTransport.cpp +6 −3 Original line number Diff line number Diff line Loading @@ -283,6 +283,7 @@ status_t InputPublisher::publishMotionEvent( int32_t deviceId, int32_t source, int32_t action, int32_t actionButton, int32_t flags, int32_t edgeFlags, int32_t metaState, Loading @@ -298,12 +299,12 @@ status_t InputPublisher::publishMotionEvent( const PointerCoords* pointerCoords) { #if DEBUG_TRANSPORT_ACTIONS ALOGD("channel '%s' publisher ~ publishMotionEvent: seq=%u, deviceId=%d, source=0x%x, " "action=0x%x, flags=0x%x, edgeFlags=0x%x, metaState=0x%x, buttonState=0x%x, " "xOffset=%f, yOffset=%f, " "action=0x%x, actionButton=0x%08x, flags=0x%x, edgeFlags=0x%x, " "metaState=0x%x, buttonState=0x%x, xOffset=%f, yOffset=%f, " "xPrecision=%f, yPrecision=%f, downTime=%lld, eventTime=%lld, " "pointerCount=%" PRIu32, mChannel->getName().string(), seq, deviceId, source, action, flags, edgeFlags, metaState, buttonState, deviceId, source, action, actionButton, flags, edgeFlags, metaState, buttonState, xOffset, yOffset, xPrecision, yPrecision, downTime, eventTime, pointerCount); #endif Loading @@ -324,6 +325,7 @@ status_t InputPublisher::publishMotionEvent( msg.body.motion.deviceId = deviceId; msg.body.motion.source = source; msg.body.motion.action = action; msg.body.motion.actionButton = actionButton; msg.body.motion.flags = flags; msg.body.motion.edgeFlags = edgeFlags; msg.body.motion.metaState = metaState; Loading Loading @@ -907,6 +909,7 @@ void InputConsumer::initializeMotionEvent(MotionEvent* event, const InputMessage msg->body.motion.deviceId, msg->body.motion.source, msg->body.motion.action, msg->body.motion.actionButton, msg->body.motion.flags, msg->body.motion.edgeFlags, msg->body.motion.metaState, Loading Loading
include/android/input.h +8 −0 Original line number Diff line number Diff line Loading @@ -305,6 +305,12 @@ enum { /* The pointer is not down but has exited the boundaries of a window or view. */ AMOTION_EVENT_ACTION_HOVER_EXIT = 10, /* One or more buttons have been pressed. */ AMOTION_EVENT_ACTION_BUTTON_PRESS = 11, /* One or more buttons have been released. */ AMOTION_EVENT_ACTION_BUTTON_RELEASE = 12, }; /* Loading Loading @@ -405,6 +411,8 @@ enum { AMOTION_EVENT_BUTTON_TERTIARY = 1 << 2, AMOTION_EVENT_BUTTON_BACK = 1 << 3, AMOTION_EVENT_BUTTON_FORWARD = 1 << 4, AMOTION_EVENT_BUTTON_STYLUS_PRIMARY = 1 << 5, AMOTION_EVENT_BUTTON_STYLUS_SECONDARY = 1 << 6, }; /* Loading
include/input/Input.h +6 −0 Original line number Diff line number Diff line Loading @@ -379,6 +379,10 @@ public: inline int32_t getButtonState() const { return mButtonState; } inline int32_t setButtonState(int32_t buttonState) { mButtonState = buttonState; } inline int32_t getActionButton() const { return mActionButton; } inline float getXOffset() const { return mXOffset; } inline float getYOffset() const { return mYOffset; } Loading Loading @@ -532,6 +536,7 @@ public: int32_t deviceId, int32_t source, int32_t action, int32_t actionButton, int32_t flags, int32_t edgeFlags, int32_t metaState, Loading Loading @@ -584,6 +589,7 @@ public: protected: int32_t mAction; int32_t mActionButton; int32_t mFlags; int32_t mEdgeFlags; int32_t mMetaState; Loading
include/input/InputTransport.h +2 −0 Original line number Diff line number Diff line Loading @@ -84,6 +84,7 @@ struct InputMessage { int32_t deviceId; int32_t source; int32_t action; int32_t actionButton; int32_t flags; int32_t metaState; int32_t buttonState; Loading Loading @@ -232,6 +233,7 @@ public: int32_t deviceId, int32_t source, int32_t action, int32_t actionButton, int32_t flags, int32_t edgeFlags, int32_t metaState, Loading
libs/input/Input.cpp +5 −0 Original line number Diff line number Diff line Loading @@ -216,6 +216,7 @@ void MotionEvent::initialize( int32_t deviceId, int32_t source, int32_t action, int32_t actionButton, int32_t flags, int32_t edgeFlags, int32_t metaState, Loading @@ -231,6 +232,7 @@ void MotionEvent::initialize( const PointerCoords* pointerCoords) { InputEvent::initialize(deviceId, source); mAction = action; mActionButton = actionButton; mFlags = flags; mEdgeFlags = edgeFlags; mMetaState = metaState; Loading @@ -250,6 +252,7 @@ void MotionEvent::initialize( void MotionEvent::copyFrom(const MotionEvent* other, bool keepHistory) { InputEvent::initialize(other->mDeviceId, other->mSource); mAction = other->mAction; mActionButton = other->mActionButton; mFlags = other->mFlags; mEdgeFlags = other->mEdgeFlags; mMetaState = other->mMetaState; Loading Loading @@ -428,6 +431,7 @@ status_t MotionEvent::readFromParcel(Parcel* parcel) { mDeviceId = parcel->readInt32(); mSource = parcel->readInt32(); mAction = parcel->readInt32(); mActionButton = parcel->readInt32(); mFlags = parcel->readInt32(); mEdgeFlags = parcel->readInt32(); mMetaState = parcel->readInt32(); Loading Loading @@ -475,6 +479,7 @@ status_t MotionEvent::writeToParcel(Parcel* parcel) const { parcel->writeInt32(mDeviceId); parcel->writeInt32(mSource); parcel->writeInt32(mAction); parcel->writeInt32(mActionButton); parcel->writeInt32(mFlags); parcel->writeInt32(mEdgeFlags); parcel->writeInt32(mMetaState); Loading
libs/input/InputTransport.cpp +6 −3 Original line number Diff line number Diff line Loading @@ -283,6 +283,7 @@ status_t InputPublisher::publishMotionEvent( int32_t deviceId, int32_t source, int32_t action, int32_t actionButton, int32_t flags, int32_t edgeFlags, int32_t metaState, Loading @@ -298,12 +299,12 @@ status_t InputPublisher::publishMotionEvent( const PointerCoords* pointerCoords) { #if DEBUG_TRANSPORT_ACTIONS ALOGD("channel '%s' publisher ~ publishMotionEvent: seq=%u, deviceId=%d, source=0x%x, " "action=0x%x, flags=0x%x, edgeFlags=0x%x, metaState=0x%x, buttonState=0x%x, " "xOffset=%f, yOffset=%f, " "action=0x%x, actionButton=0x%08x, flags=0x%x, edgeFlags=0x%x, " "metaState=0x%x, buttonState=0x%x, xOffset=%f, yOffset=%f, " "xPrecision=%f, yPrecision=%f, downTime=%lld, eventTime=%lld, " "pointerCount=%" PRIu32, mChannel->getName().string(), seq, deviceId, source, action, flags, edgeFlags, metaState, buttonState, deviceId, source, action, actionButton, flags, edgeFlags, metaState, buttonState, xOffset, yOffset, xPrecision, yPrecision, downTime, eventTime, pointerCount); #endif Loading @@ -324,6 +325,7 @@ status_t InputPublisher::publishMotionEvent( msg.body.motion.deviceId = deviceId; msg.body.motion.source = source; msg.body.motion.action = action; msg.body.motion.actionButton = actionButton; msg.body.motion.flags = flags; msg.body.motion.edgeFlags = edgeFlags; msg.body.motion.metaState = metaState; Loading Loading @@ -907,6 +909,7 @@ void InputConsumer::initializeMotionEvent(MotionEvent* event, const InputMessage msg->body.motion.deviceId, msg->body.motion.source, msg->body.motion.action, msg->body.motion.actionButton, msg->body.motion.flags, msg->body.motion.edgeFlags, msg->body.motion.metaState, Loading