diff options
| author | 2018-07-05 18:28:56 +0000 | |
|---|---|---|
| committer | 2018-07-05 18:28:56 +0000 | |
| commit | 0f2525cd6e5a809cac40f5aed4f99f1f4fb471ea (patch) | |
| tree | a7932e8098a7c026efbd60e6418380ba0d662256 /libs/input/Input.cpp | |
| parent | 6cdae00a78956365d264504618822677d0ae832b (diff) | |
| parent | a62a8dd15e3deb4622e3ee8fd844999cf4fafc41 (diff) | |
Merge "Move displayid into InputEvent"
Diffstat (limited to 'libs/input/Input.cpp')
| -rw-r--r-- | libs/input/Input.cpp | 13 | 
1 files changed, 7 insertions, 6 deletions
| diff --git a/libs/input/Input.cpp b/libs/input/Input.cpp index db27e11e24..8a15e2f40f 100644 --- a/libs/input/Input.cpp +++ b/libs/input/Input.cpp @@ -31,14 +31,16 @@ namespace android {  // --- InputEvent --- -void InputEvent::initialize(int32_t deviceId, int32_t source) { +void InputEvent::initialize(int32_t deviceId, int32_t source, int32_t displayId) {      mDeviceId = deviceId;      mSource = source; +    mDisplayId = displayId;  }  void InputEvent::initialize(const InputEvent& from) {      mDeviceId = from.mDeviceId;      mSource = from.mSource; +    mDisplayId = from.mDisplayId;  }  // --- KeyEvent --- @@ -54,6 +56,7 @@ int32_t KeyEvent::getKeyCodeFromLabel(const char* label) {  void KeyEvent::initialize(          int32_t deviceId,          int32_t source, +        int32_t displayId,          int32_t action,          int32_t flags,          int32_t keyCode, @@ -62,7 +65,7 @@ void KeyEvent::initialize(          int32_t repeatCount,          nsecs_t downTime,          nsecs_t eventTime) { -    InputEvent::initialize(deviceId, source); +    InputEvent::initialize(deviceId, source, displayId);      mAction = action;      mFlags = flags;      mKeyCode = keyCode; @@ -231,8 +234,7 @@ void MotionEvent::initialize(          size_t pointerCount,          const PointerProperties* pointerProperties,          const PointerCoords* pointerCoords) { -    InputEvent::initialize(deviceId, source); -    mDisplayId = displayId; +    InputEvent::initialize(deviceId, source, displayId);      mAction = action;      mActionButton = actionButton;      mFlags = flags; @@ -252,8 +254,7 @@ void MotionEvent::initialize(  }  void MotionEvent::copyFrom(const MotionEvent* other, bool keepHistory) { -    InputEvent::initialize(other->mDeviceId, other->mSource); -    mDisplayId = other->mDisplayId; +    InputEvent::initialize(other->mDeviceId, other->mSource, other->mDisplayId);      mAction = other->mAction;      mActionButton = other->mActionButton;      mFlags = other->mFlags; |