summaryrefslogtreecommitdiff
path: root/include/input/InputTransport.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/input/InputTransport.h')
-rw-r--r--include/input/InputTransport.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/include/input/InputTransport.h b/include/input/InputTransport.h
index 944947420e..ea1d2aa41f 100644
--- a/include/input/InputTransport.h
+++ b/include/input/InputTransport.h
@@ -381,6 +381,18 @@ private:
}
}
+ void initializeFrom(const History& other) {
+ eventTime = other.eventTime;
+ idBits = other.idBits; // temporary copy
+ for (size_t i = 0; i < other.idBits.count(); i++) {
+ uint32_t id = idBits.clearFirstMarkedBit();
+ int32_t index = other.idToIndex[id];
+ idToIndex[id] = index;
+ pointers[index].copyFrom(other.pointers[index]);
+ }
+ idBits = other.idBits; // final copy
+ }
+
const PointerCoords& getPointerById(uint32_t id) const {
return pointers[idToIndex[id]];
}
@@ -455,7 +467,6 @@ private:
int32_t* displayId);
void updateTouchState(InputMessage& msg);
- bool rewriteMessage(const TouchState& state, InputMessage& msg);
void resampleTouchState(nsecs_t frameTime, MotionEvent* event,
const InputMessage *next);
@@ -464,6 +475,7 @@ private:
status_t sendUnchainedFinishedSignal(uint32_t seq, bool handled);
+ static void rewriteMessage(TouchState& state, InputMessage& msg);
static void initializeKeyEvent(KeyEvent* event, const InputMessage* msg);
static void initializeMotionEvent(MotionEvent* event, const InputMessage* msg);
static void addSample(MotionEvent* event, const InputMessage* msg);