From 95a4ed6e84e9b8845359f601050218fa28459f4b Mon Sep 17 00:00:00 2001 From: Siarhei Vishniakou Date: Fri, 1 Nov 2019 05:53:44 +0000 Subject: Revert "Let InputReader handle its own thread" This reverts commit ba266f24e580de2d8339050b62fad7e66441f843. Reason for revert: b/143735040 looks like this CL breaks input tests Change-Id: I8c19046935d2bdaf9df5df97b2eff43308065c72 --- services/inputflinger/InputManager.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'services/inputflinger/InputManager.cpp') diff --git a/services/inputflinger/InputManager.cpp b/services/inputflinger/InputManager.cpp index 34a04dfd95..7d3067242a 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(); -- cgit v1.2.3-59-g8ed1b