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

Commit 370dbc94 authored by Prabir Pradhan's avatar Prabir Pradhan
Browse files

Dump all native input components from InputManager

This makes it so that we don't have to expose all native components to
NativeInputManager just to dump them.

This also means we no longer have to expose the
UnwantedInteractionBlocker to NativeInputManager.

Bug: 275726706
Test: build
Change-Id: I43ef5012d5767d211dfc9456cef34d538b9fcd91
parent e3da4bbc
Loading
Loading
Loading
Loading
+11 −4
Original line number Diff line number Diff line
@@ -110,10 +110,6 @@ InputReaderInterface& InputManager::getReader() {
    return *mReader;
}

UnwantedInteractionBlockerInterface& InputManager::getBlocker() {
    return *mBlocker;
}

InputProcessorInterface& InputManager::getProcessor() {
    return *mProcessor;
}
@@ -129,6 +125,17 @@ void InputManager::monitor() {
    mDispatcher->monitor();
}

void InputManager::dump(std::string& dump) {
    mReader->dump(dump);
    dump += '\n';
    mBlocker->dump(dump);
    dump += '\n';
    mProcessor->dump(dump);
    dump += '\n';
    mDispatcher->dump(dump);
    dump += '\n';
}

// Used by tests only.
binder::Status InputManager::createInputChannel(const std::string& name, InputChannel* outChannel) {
    IPCThreadState* ipc = IPCThreadState::self();
+4 −4
Original line number Diff line number Diff line
@@ -82,9 +82,6 @@ public:
    /* Gets the input reader. */
    virtual InputReaderInterface& getReader() = 0;

    /* Gets the unwanted interaction blocker. */
    virtual UnwantedInteractionBlockerInterface& getBlocker() = 0;

    /* Gets the input processor */
    virtual InputProcessorInterface& getProcessor() = 0;

@@ -93,6 +90,9 @@ public:

    /* Check that the input stages have not deadlocked. */
    virtual void monitor() = 0;

    /* Dump the state of the components controlled by the input manager. */
    virtual void dump(std::string& dump) = 0;
};

class InputManager : public InputManagerInterface, public BnInputFlinger {
@@ -108,10 +108,10 @@ public:
    status_t stop() override;

    InputReaderInterface& getReader() override;
    UnwantedInteractionBlockerInterface& getBlocker() override;
    InputProcessorInterface& getProcessor() override;
    InputDispatcherInterface& getDispatcher() override;
    void monitor() override;
    void dump(std::string& dump) override;

    status_t dump(int fd, const Vector<String16>& args) override;
    binder::Status createInputChannel(const std::string& name, InputChannel* outChannel) override;