diff options
author | 2023-10-05 15:40:38 -0700 | |
---|---|---|
committer | 2023-10-05 15:40:38 -0700 | |
commit | 1961b2f7b191744f3fc6bb4d32f0da0ce3ee0567 (patch) | |
tree | b9785db180fb54b3a776f645cbb2a7ef480e0cb9 /services/inputflinger/InputManager.cpp | |
parent | e4b64ebecf894e3047e46894a83ab8d37feabd3e (diff) | |
parent | 313d1596d818bc94fbab3d42b8c50306871f74a5 (diff) |
Merge Android 14
Bug: 298295554
Merged-In: I114a4cf83978f152959a6ec244d322603ff5257b
Change-Id: Ia35ae6e11052fcc3b2bdaabd6dc57d0d223de269
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(); |