diff options
author | Narayan Kamath <narayan@google.com> | 2014-05-16 12:10:21 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-05-16 12:10:21 +0000 |
commit | f8c66b4bee9ab0203b83ea3a6df8f49fad443d88 (patch) | |
tree | 6ad54846656801cf8d7408ae84154869271d8aba /libs | |
parent | bd0f91537be0e506a92687d6084a2659cf34399c (diff) | |
parent | cfba3bf1606dfdb1daf1be1c19176180660ae19d (diff) | |
download | frameworks_native-f8c66b4bee9ab0203b83ea3a6df8f49fad443d88.zip frameworks_native-f8c66b4bee9ab0203b83ea3a6df8f49fad443d88.tar.gz frameworks_native-f8c66b4bee9ab0203b83ea3a6df8f49fad443d88.tar.bz2 |
am cfba3bf1: am c9fcaf37: Merge "Change InputMessage.motion.pointerSize to a uint32_t."
* commit 'cfba3bf1606dfdb1daf1be1c19176180660ae19d':
Change InputMessage.motion.pointerSize to a uint32_t.
Diffstat (limited to 'libs')
-rw-r--r-- | libs/input/InputTransport.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/libs/input/InputTransport.cpp b/libs/input/InputTransport.cpp index 09b2e7c..2d0fb8c 100644 --- a/libs/input/InputTransport.cpp +++ b/libs/input/InputTransport.cpp @@ -292,7 +292,7 @@ status_t InputPublisher::publishMotionEvent( float yPrecision, nsecs_t downTime, nsecs_t eventTime, - size_t pointerCount, + uint32_t pointerCount, const PointerProperties* pointerProperties, const PointerCoords* pointerCoords) { #if DEBUG_TRANSPORT_ACTIONS @@ -334,7 +334,7 @@ status_t InputPublisher::publishMotionEvent( msg.body.motion.downTime = downTime; msg.body.motion.eventTime = eventTime; msg.body.motion.pointerCount = pointerCount; - for (size_t i = 0; i < pointerCount; i++) { + for (uint32_t i = 0; i < pointerCount; i++) { msg.body.motion.pointers[i].properties.copyFrom(pointerProperties[i]); msg.body.motion.pointers[i].coords.copyFrom(pointerCoords[i]); } @@ -654,7 +654,7 @@ void InputConsumer::updateTouchState(InputMessage* msg) { } void InputConsumer::rewriteMessage(const TouchState& state, InputMessage* msg) { - for (size_t i = 0; i < msg->body.motion.pointerCount; i++) { + for (uint32_t i = 0; i < msg->body.motion.pointerCount; i++) { uint32_t id = msg->body.motion.pointers[i].properties.id; if (state.lastResample.idBits.hasBit(id)) { PointerCoords& msgCoords = msg->body.motion.pointers[i].coords; @@ -894,10 +894,10 @@ void InputConsumer::initializeKeyEvent(KeyEvent* event, const InputMessage* msg) } void InputConsumer::initializeMotionEvent(MotionEvent* event, const InputMessage* msg) { - size_t pointerCount = msg->body.motion.pointerCount; + uint32_t pointerCount = msg->body.motion.pointerCount; PointerProperties pointerProperties[pointerCount]; PointerCoords pointerCoords[pointerCount]; - for (size_t i = 0; i < pointerCount; i++) { + for (uint32_t i = 0; i < pointerCount; i++) { pointerProperties[i].copyFrom(msg->body.motion.pointers[i].properties); pointerCoords[i].copyFrom(msg->body.motion.pointers[i].coords); } @@ -922,9 +922,9 @@ void InputConsumer::initializeMotionEvent(MotionEvent* event, const InputMessage } void InputConsumer::addSample(MotionEvent* event, const InputMessage* msg) { - size_t pointerCount = msg->body.motion.pointerCount; + uint32_t pointerCount = msg->body.motion.pointerCount; PointerCoords pointerCoords[pointerCount]; - for (size_t i = 0; i < pointerCount; i++) { + for (uint32_t i = 0; i < pointerCount; i++) { pointerCoords[i].copyFrom(msg->body.motion.pointers[i].coords); } @@ -934,7 +934,7 @@ void InputConsumer::addSample(MotionEvent* event, const InputMessage* msg) { bool InputConsumer::canAddSample(const Batch& batch, const InputMessage *msg) { const InputMessage& head = batch.samples.itemAt(0); - size_t pointerCount = msg->body.motion.pointerCount; + uint32_t pointerCount = msg->body.motion.pointerCount; if (head.body.motion.pointerCount != pointerCount || head.body.motion.action != msg->body.motion.action) { return false; |