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
diff --git a/services/inputflinger/InputManager.cpp b/services/inputflinger/InputManager.cpp
index 9182503..472d7a1 100644
--- a/services/inputflinger/InputManager.cpp
+++ b/services/inputflinger/InputManager.cpp
@@ -110,10 +110,6 @@
return *mReader;
}
-UnwantedInteractionBlockerInterface& InputManager::getBlocker() {
- return *mBlocker;
-}
-
InputProcessorInterface& InputManager::getProcessor() {
return *mProcessor;
}
@@ -129,6 +125,17 @@
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();
diff --git a/services/inputflinger/InputManager.h b/services/inputflinger/InputManager.h
index 1137193..793757d 100644
--- a/services/inputflinger/InputManager.h
+++ b/services/inputflinger/InputManager.h
@@ -82,9 +82,6 @@
/* 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 @@
/* 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 @@
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;