From 73007b64aa670cc15f031c60c88587b675f47680 Mon Sep 17 00:00:00 2001 From: Garfield Tan Date: Thu, 29 Aug 2019 17:28:41 -0700 Subject: Divide InputDispatcher into several files. This CL does: 1) Isolate implementation details of InputDispatcher from outside and only expose necessary header files; 2) Move implementation details into android::inputdispatcher namespace; 3) Make input dispatcher a static library for inputflinger to link against; 4) Add InputDispatcherFactory.{h,cpp} to isolate implementation details in InputDispatcher.h from InputManager. Bug: 140139676 Test: Mouse clicks can be dispatched to right windows. Change-Id: Ib61c16fd41f3f76f538a3de9b54f31ac304e03a5 Merged-In: Ib61c16fd41f3f76f538a3de9b54f31ac304e03a5 --- services/inputflinger/InputManager.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'services/inputflinger/InputManager.cpp') diff --git a/services/inputflinger/InputManager.cpp b/services/inputflinger/InputManager.cpp index 3996cca646..359325faed 100644 --- a/services/inputflinger/InputManager.cpp +++ b/services/inputflinger/InputManager.cpp @@ -19,6 +19,8 @@ //#define LOG_NDEBUG 0 #include "InputManager.h" +#include "InputDispatcherFactory.h" +#include "InputDispatcherThread.h" #include "InputReaderFactory.h" #include @@ -33,7 +35,7 @@ namespace android { InputManager::InputManager( const sp& readerPolicy, const sp& dispatcherPolicy) { - mDispatcher = new InputDispatcher(dispatcherPolicy); + mDispatcher = createInputDispatcher(dispatcherPolicy); mClassifier = new InputClassifier(mDispatcher); mReader = createInputReader(readerPolicy, mClassifier); initialize(); -- cgit v1.2.3-59-g8ed1b