summaryrefslogtreecommitdiff
path: root/services/inputflinger/InputReaderBase.cpp
diff options
context:
space:
mode:
author Prabir Pradhan <prabirmsp@google.com> 2019-09-03 17:11:27 -0700
committer Prabir Pradhan <prabirmsp@google.com> 2019-10-29 20:08:50 -0700
commitba266f24e580de2d8339050b62fad7e66441f843 (patch)
tree5ca7c2b4bc7c7a42bd22ff95f34ce1c78ef143ba /services/inputflinger/InputReaderBase.cpp
parent2574dfa1fe4b83cda231a4f4ec4de3cb5f5109a5 (diff)
Let InputReader handle its own thread
Previously, InputManager created and managed the InputReaderThread, which interacted with InputReader through the loopOnce() method in InputReaderInterface. We move the threading logic from InputManager to InputReader by removing the loopOnce() method from InputReaderInterface and adding a start() and stop() method in its place. Once InputReader is created, InputManager will call InputReaderInterface::start(), which creates and starts InputReader's own thread. InputManager can also call InputReaderInterface::stop() to halt further processing on InputReader's thread. Bug: 130819454 Test: atest inputflinger_tests Test: Touch input works on crosshatch Change-Id: Ic732436d4f00a831e317be1f16ac106a11652cff
Diffstat (limited to 'services/inputflinger/InputReaderBase.cpp')
-rw-r--r--services/inputflinger/InputReaderBase.cpp14
1 files changed, 0 insertions, 14 deletions
diff --git a/services/inputflinger/InputReaderBase.cpp b/services/inputflinger/InputReaderBase.cpp
index 0422d8342b..2d6f2c1cc9 100644
--- a/services/inputflinger/InputReaderBase.cpp
+++ b/services/inputflinger/InputReaderBase.cpp
@@ -33,20 +33,6 @@ using android::base::StringPrintf;
namespace android {
-// --- InputReaderThread ---
-
-InputReaderThread::InputReaderThread(const sp<InputReaderInterface>& reader) :
- Thread(/*canCallJava*/ true), mReader(reader) {
-}
-
-InputReaderThread::~InputReaderThread() {
-}
-
-bool InputReaderThread::threadLoop() {
- mReader->loopOnce();
- return true;
-}
-
// --- InputReaderConfiguration ---
std::string InputReaderConfiguration::changesToString(uint32_t changes) {