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

Commit 5e20f27d authored by Siarhei Vishniakou's avatar Siarhei Vishniakou
Browse files

Mark InputDispatcher::dump as const

This helps debug InputDispatcher by dumping its state from other const functions.

Bug: 281806933
Test: none
Change-Id: Ic7f1cef7eeaa753115143756ce60f4167412ef24
parent 489359cb
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -6590,7 +6590,7 @@ void InputDispatcher::traceWaitQueueLength(const Connection& connection) {
    }
}

void InputDispatcher::dump(std::string& dump) {
void InputDispatcher::dump(std::string& dump) const {
    std::scoped_lock _l(mLock);

    dump += "Input Dispatcher State:\n";
+1 −1
Original line number Diff line number Diff line
@@ -87,7 +87,7 @@ public:
                             std::chrono::nanoseconds staleEventTimeout);
    ~InputDispatcher() override;

    void dump(std::string& dump) override;
    void dump(std::string& dump) const override;
    void monitor() override;
    bool waitForIdle() const override;
    status_t start() override;
+1 −1
Original line number Diff line number Diff line
@@ -39,7 +39,7 @@ public:
    /* Dumps the state of the input dispatcher.
     *
     * This method may be called on any thread (usually by the input manager). */
    virtual void dump(std::string& dump) = 0;
    virtual void dump(std::string& dump) const = 0;

    /* Called by the heatbeat to ensures that the dispatcher has not deadlocked. */
    virtual void monitor() = 0;