Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b8df0ef2 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Use a const InputDeviceContext ref in HardwareStateConverter"

parents e383bd91 ba9364ac
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -403,7 +403,7 @@ public:
    inline status_t enableDevice() { return mEventHub->enableDevice(mId); }
    inline status_t disableDevice() { return mEventHub->disableDevice(mId); }

    inline const std::string getName() { return mDevice.getName(); }
    inline const std::string getName() const { return mDevice.getName(); }
    inline const std::string getDescriptor() { return mDevice.getDescriptor(); }
    inline bool isExternal() { return mDevice.isExternal(); }
    inline std::optional<uint8_t> getAssociatedDisplayPort() const {
+1 −1
Original line number Diff line number Diff line
@@ -25,7 +25,7 @@ CursorButtonAccumulator::CursorButtonAccumulator() {
    clearButtons();
}

void CursorButtonAccumulator::reset(InputDeviceContext& deviceContext) {
void CursorButtonAccumulator::reset(const InputDeviceContext& deviceContext) {
    mBtnLeft = deviceContext.isKeyPressed(BTN_LEFT);
    mBtnRight = deviceContext.isKeyPressed(BTN_RIGHT);
    mBtnMiddle = deviceContext.isKeyPressed(BTN_MIDDLE);
+1 −1
Original line number Diff line number Diff line
@@ -27,7 +27,7 @@ struct RawEvent;
class CursorButtonAccumulator {
public:
    CursorButtonAccumulator();
    void reset(InputDeviceContext& deviceContext);
    void reset(const InputDeviceContext& deviceContext);

    void process(const RawEvent* rawEvent);

+2 −2
Original line number Diff line number Diff line
@@ -26,8 +26,8 @@ namespace android {
MultiTouchMotionAccumulator::MultiTouchMotionAccumulator()
      : mCurrentSlot(-1), mUsingSlotsProtocol(false) {}

void MultiTouchMotionAccumulator::configure(InputDeviceContext& deviceContext, size_t slotCount,
                                            bool usingSlotsProtocol) {
void MultiTouchMotionAccumulator::configure(const InputDeviceContext& deviceContext,
                                            size_t slotCount, bool usingSlotsProtocol) {
    mUsingSlotsProtocol = usingSlotsProtocol;
    mSlots = std::vector<Slot>(slotCount);

+2 −1
Original line number Diff line number Diff line
@@ -72,7 +72,8 @@ public:

    MultiTouchMotionAccumulator();

    void configure(InputDeviceContext& deviceContext, size_t slotCount, bool usingSlotsProtocol);
    void configure(const InputDeviceContext& deviceContext, size_t slotCount,
                   bool usingSlotsProtocol);
    void process(const RawEvent* rawEvent);
    void finishSync();

Loading