Loading services/input/InputReader.cpp +8 −4 Original line number Diff line number Diff line Loading @@ -5376,7 +5376,8 @@ MultiTouchInputMapper::~MultiTouchInputMapper() { } void MultiTouchInputMapper::clearState() { mAccumulator.clear(mSlotCount); mAccumulator.clearSlots(mSlotCount); mAccumulator.clearButtons(); mButtonState = 0; } Loading Loading @@ -5410,13 +5411,13 @@ void MultiTouchInputMapper::process(const RawEvent* rawEvent) { } if (mAccumulator.currentSlot < 0 || size_t(mAccumulator.currentSlot) >= mSlotCount) { if (newSlot) { #if DEBUG_POINTERS if (newSlot) { LOGW("MultiTouch device %s emitted invalid slot index %d but it " "should be between 0 and %d; ignoring this slot.", getDeviceName().string(), mAccumulator.currentSlot, mSlotCount); #endif } #endif break; } Loading Loading @@ -5619,7 +5620,10 @@ void MultiTouchInputMapper::sync(nsecs_t when) { syncTouch(when, havePointerIds); mAccumulator.clear(mUsingSlotsProtocol ? 0 : mSlotCount); if (!mUsingSlotsProtocol) { mAccumulator.clearSlots(mSlotCount); } mAccumulator.clearButtons(); } void MultiTouchInputMapper::configureRawAxes() { Loading services/input/InputReader.h +5 −3 Original line number Diff line number Diff line Loading @@ -1243,8 +1243,7 @@ private: uint32_t buttonDown; uint32_t buttonUp; Accumulator() : slots(NULL) { clear(false); Accumulator() : currentSlot(0), slots(NULL), buttonDown(0), buttonUp(0) { } ~Accumulator() { Loading @@ -1255,11 +1254,14 @@ private: slots = new Slot[slotCount]; } void clear(size_t slotCount) { void clearSlots(size_t slotCount) { for (size_t i = 0; i < slotCount; i++) { slots[i].clear(); } currentSlot = 0; } void clearButtons() { buttonDown = 0; buttonUp = 0; } Loading Loading
services/input/InputReader.cpp +8 −4 Original line number Diff line number Diff line Loading @@ -5376,7 +5376,8 @@ MultiTouchInputMapper::~MultiTouchInputMapper() { } void MultiTouchInputMapper::clearState() { mAccumulator.clear(mSlotCount); mAccumulator.clearSlots(mSlotCount); mAccumulator.clearButtons(); mButtonState = 0; } Loading Loading @@ -5410,13 +5411,13 @@ void MultiTouchInputMapper::process(const RawEvent* rawEvent) { } if (mAccumulator.currentSlot < 0 || size_t(mAccumulator.currentSlot) >= mSlotCount) { if (newSlot) { #if DEBUG_POINTERS if (newSlot) { LOGW("MultiTouch device %s emitted invalid slot index %d but it " "should be between 0 and %d; ignoring this slot.", getDeviceName().string(), mAccumulator.currentSlot, mSlotCount); #endif } #endif break; } Loading Loading @@ -5619,7 +5620,10 @@ void MultiTouchInputMapper::sync(nsecs_t when) { syncTouch(when, havePointerIds); mAccumulator.clear(mUsingSlotsProtocol ? 0 : mSlotCount); if (!mUsingSlotsProtocol) { mAccumulator.clearSlots(mSlotCount); } mAccumulator.clearButtons(); } void MultiTouchInputMapper::configureRawAxes() { Loading
services/input/InputReader.h +5 −3 Original line number Diff line number Diff line Loading @@ -1243,8 +1243,7 @@ private: uint32_t buttonDown; uint32_t buttonUp; Accumulator() : slots(NULL) { clear(false); Accumulator() : currentSlot(0), slots(NULL), buttonDown(0), buttonUp(0) { } ~Accumulator() { Loading @@ -1255,11 +1254,14 @@ private: slots = new Slot[slotCount]; } void clear(size_t slotCount) { void clearSlots(size_t slotCount) { for (size_t i = 0; i < slotCount; i++) { slots[i].clear(); } currentSlot = 0; } void clearButtons() { buttonDown = 0; buttonUp = 0; } Loading