diff options
| author | 2023-11-16 16:11:16 +0000 | |
|---|---|---|
| committer | 2023-11-16 16:11:16 +0000 | |
| commit | d5333215ba5184c4ade198e37faeb626bb70942c (patch) | |
| tree | e6c5c29e878b099edef7753d779fe7ca7abdc106 /services/inputflinger/InputManager.cpp | |
| parent | 34a5980f5c8295c02002a2fd2ae62d77d6be1ead (diff) | |
| parent | 5766aee030d135875317d742f9c23039a7e382a3 (diff) | |
Merge "Add InputFilter rust component as InputListener stage." into main
Diffstat (limited to 'services/inputflinger/InputManager.cpp')
| -rw-r--r-- | services/inputflinger/InputManager.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/services/inputflinger/InputManager.cpp b/services/inputflinger/InputManager.cpp index 92c65e19b6..8cf61f9064 100644 --- a/services/inputflinger/InputManager.cpp +++ b/services/inputflinger/InputManager.cpp @@ -42,6 +42,7 @@ const bool ENABLE_INPUT_DEVICE_USAGE_METRICS = sysprop::InputProperties::enable_input_device_usage_metrics().value_or(true); const bool ENABLE_POINTER_CHOREOGRAPHER = input_flags::enable_pointer_choreographer(); +const bool ENABLE_INPUT_FILTER_RUST = input_flags::enable_input_filter_rust_impl(); int32_t exceptionCodeFromStatusT(status_t status) { switch (status) { @@ -118,6 +119,7 @@ std::shared_ptr<IInputFlingerRust> createInputFlingerRust() { * The event flow is via the "InputListener" interface, as follows: * InputReader * -> UnwantedInteractionBlocker + * -> InputFilter * -> PointerChoreographer * -> InputProcessor * -> InputDeviceMetricsCollector @@ -132,6 +134,12 @@ InputManager::InputManager(const sp<InputReaderPolicyInterface>& readerPolicy, mTracingStages.emplace_back( std::make_unique<TracedInputListener>("InputDispatcher", *mDispatcher)); + if (ENABLE_INPUT_FILTER_RUST) { + mInputFilter = std::make_unique<InputFilter>(*mTracingStages.back(), *mInputFlingerRust); + mTracingStages.emplace_back( + std::make_unique<TracedInputListener>("InputFilter", *mInputFilter)); + } + if (ENABLE_INPUT_DEVICE_USAGE_METRICS) { mCollector = std::make_unique<InputDeviceMetricsCollector>(*mTracingStages.back()); mTracingStages.emplace_back( |