diff options
Diffstat (limited to 'services/inputflinger/InputManager.cpp')
-rw-r--r-- | services/inputflinger/InputManager.cpp | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/services/inputflinger/InputManager.cpp b/services/inputflinger/InputManager.cpp index 9767cd9b71..ddebcad0d3 100644 --- a/services/inputflinger/InputManager.cpp +++ b/services/inputflinger/InputManager.cpp @@ -55,14 +55,13 @@ static int32_t exceptionCodeFromStatusT(status_t status) { /** * The event flow is via the "InputListener" interface, as follows: - * InputReader -> UnwantedInteractionBlocker -> InputClassifier -> InputDispatcher + * InputReader -> UnwantedInteractionBlocker -> InputProcessor -> InputDispatcher */ -InputManager::InputManager( - const sp<InputReaderPolicyInterface>& readerPolicy, - const sp<InputDispatcherPolicyInterface>& dispatcherPolicy) { +InputManager::InputManager(const sp<InputReaderPolicyInterface>& readerPolicy, + InputDispatcherPolicyInterface& dispatcherPolicy) { mDispatcher = createInputDispatcher(dispatcherPolicy); - mClassifier = std::make_unique<InputClassifier>(*mDispatcher); - mBlocker = std::make_unique<UnwantedInteractionBlocker>(*mClassifier); + mProcessor = std::make_unique<InputProcessor>(*mDispatcher); + mBlocker = std::make_unique<UnwantedInteractionBlocker>(*mProcessor); mReader = createInputReader(readerPolicy, *mBlocker); } @@ -110,12 +109,8 @@ InputReaderInterface& InputManager::getReader() { return *mReader; } -UnwantedInteractionBlockerInterface& InputManager::getUnwantedInteractionBlocker() { - return *mBlocker; -} - -InputClassifierInterface& InputManager::getClassifier() { - return *mClassifier; +InputProcessorInterface& InputManager::getProcessor() { + return *mProcessor; } InputDispatcherInterface& InputManager::getDispatcher() { @@ -125,10 +120,21 @@ InputDispatcherInterface& InputManager::getDispatcher() { void InputManager::monitor() { mReader->monitor(); mBlocker->monitor(); - mClassifier->monitor(); + mProcessor->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(); |