summaryrefslogtreecommitdiff
path: root/services/inputflinger/InputManager.cpp
diff options
context:
space:
mode:
author Prabir Pradhan <prabirmsp@google.com> 2023-04-20 21:30:40 +0000
committer Prabir Pradhan <prabirmsp@google.com> 2023-04-27 17:32:16 +0000
commita41d244c8b7985f587aada2d89e2ae3ad1f00dff (patch)
treedb2eea4cd89fad175c01e2e380d2325178df6933 /services/inputflinger/InputManager.cpp
parent87112a7b0f769a096d2101d9456c6360cb61617c (diff)
Clean up InputDispatcherPolicyInterface
- Remove RefBase from policy - Store reference instead of pointer to policy - Use references instead of pointers in parameters - Use return values for all outputs for functions instead of passing an out parameter Bug: 279927189 Bug: 245989146 Test: Presubmit Change-Id: I31a2a3e8c67960020169ddfc59bc0a59f3e65c52
Diffstat (limited to 'services/inputflinger/InputManager.cpp')
-rw-r--r--services/inputflinger/InputManager.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/services/inputflinger/InputManager.cpp b/services/inputflinger/InputManager.cpp
index 472d7a15b4..ddebcad0d3 100644
--- a/services/inputflinger/InputManager.cpp
+++ b/services/inputflinger/InputManager.cpp
@@ -57,9 +57,8 @@ static int32_t exceptionCodeFromStatusT(status_t status) {
* The event flow is via the "InputListener" interface, as follows:
* 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);
mProcessor = std::make_unique<InputProcessor>(*mDispatcher);
mBlocker = std::make_unique<UnwantedInteractionBlocker>(*mProcessor);