diff options
author | 2018-11-14 20:14:11 -0800 | |
---|---|---|
committer | 2018-11-20 14:08:48 -0800 | |
commit | 29c95334ebb5346c92cff9a9c928af175644ad8f (patch) | |
tree | ebd5f1465c333fc1dd1ec22ecdb91c3899ce1be6 /services/inputflinger/InputManager.cpp | |
parent | b17611d4884054dde07e8a21d90512399f6dd867 (diff) |
Split InputFlinger into multiple libraries
This is the InputFlinger FE/BE split as detailed in
go/arc++inputflinger-split.
We split libinputflinger into the following dynamic libraries:
- libinputflinger: Acts as the frontend for inputflinger and implements
InputDispatcher and InputManager.
- libinputreader: Acts as the backend for inputflinger and impliements
InputReader and EventHub, and adds a InputReaderFactory to create
the InputReader.
- libinputflinger_base: Contains the common logic that is shared
throughout InputFlinger, and contains the definitions for
InputReaderInterface (in InputReaderBase.h) and
InputListenerInterface (in InputListener.h).
Bug: 119264687
Test: manual: Build, run, and test input (touch, mouse)
Change-Id: I8567635f48de58ee8e5bdb0f8a17a73ea6fa37ef
Diffstat (limited to 'services/inputflinger/InputManager.cpp')
-rw-r--r-- | services/inputflinger/InputManager.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/services/inputflinger/InputManager.cpp b/services/inputflinger/InputManager.cpp index 40ca6a7d6d..388423ca20 100644 --- a/services/inputflinger/InputManager.cpp +++ b/services/inputflinger/InputManager.cpp @@ -19,6 +19,7 @@ //#define LOG_NDEBUG 0 #include "InputManager.h" +#include "InputReaderFactory.h" #include <log/log.h> #include <unordered_map> @@ -26,19 +27,10 @@ namespace android { InputManager::InputManager( - const sp<EventHubInterface>& eventHub, const sp<InputReaderPolicyInterface>& readerPolicy, const sp<InputDispatcherPolicyInterface>& dispatcherPolicy) { mDispatcher = new InputDispatcher(dispatcherPolicy); - mReader = new InputReader(eventHub, readerPolicy, mDispatcher); - initialize(); -} - -InputManager::InputManager( - const sp<InputReaderInterface>& reader, - const sp<InputDispatcherInterface>& dispatcher) : - mReader(reader), - mDispatcher(dispatcher) { + mReader = createInputReader(readerPolicy, mDispatcher); initialize(); } |