summaryrefslogtreecommitdiff
path: root/services/inputflinger/InputManager.cpp
diff options
context:
space:
mode:
author TreeHugger Robot <treehugger-gerrit@google.com> 2019-11-01 07:59:34 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2019-11-01 07:59:34 +0000
commitb2ffebef02c29b05bbb1057a43c8add6fc92bce4 (patch)
tree56e745114376497dcac64002de4c3e61c0fd1707 /services/inputflinger/InputManager.cpp
parent5b7e0882ccb39ae6a2555aaa8a64bff7b08147f7 (diff)
parent95a4ed6e84e9b8845359f601050218fa28459f4b (diff)
Merge "Revert "Let InputReader handle its own thread""
Diffstat (limited to 'services/inputflinger/InputManager.cpp')
-rw-r--r--services/inputflinger/InputManager.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/services/inputflinger/InputManager.cpp b/services/inputflinger/InputManager.cpp
index 1043390f84..e7640dd6af 100644
--- a/services/inputflinger/InputManager.cpp
+++ b/services/inputflinger/InputManager.cpp
@@ -46,6 +46,7 @@ InputManager::~InputManager() {
}
void InputManager::initialize() {
+ mReaderThread = new InputReaderThread(mReader);
mDispatcherThread = new InputDispatcherThread(mDispatcher);
}
@@ -56,9 +57,9 @@ status_t InputManager::start() {
return result;
}
- result = mReader->start();
+ result = mReaderThread->run("InputReader", PRIORITY_URGENT_DISPLAY);
if (result) {
- ALOGE("Could not start InputReader due to error %d.", result);
+ ALOGE("Could not start InputReader thread due to error %d.", result);
mDispatcherThread->requestExit();
return result;
@@ -68,9 +69,9 @@ status_t InputManager::start() {
}
status_t InputManager::stop() {
- status_t result = mReader->stop();
+ status_t result = mReaderThread->requestExitAndWait();
if (result) {
- ALOGW("Could not stop InputReader due to error %d.", result);
+ ALOGW("Could not stop InputReader thread due to error %d.", result);
}
result = mDispatcherThread->requestExitAndWait();