summaryrefslogtreecommitdiff
path: root/services/inputflinger/InputReaderBase.cpp
diff options
context:
space:
mode:
author Siarhei Vishniakou <svv@google.com> 2019-11-01 05:53:44 +0000
committer Siarhei Vishniakou <svv@google.com> 2019-11-01 05:53:44 +0000
commit95a4ed6e84e9b8845359f601050218fa28459f4b (patch)
treebff866cfcf0c6f095e151ca4b98b47fb4fd20255 /services/inputflinger/InputReaderBase.cpp
parentba266f24e580de2d8339050b62fad7e66441f843 (diff)
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
Diffstat (limited to 'services/inputflinger/InputReaderBase.cpp')
-rw-r--r--services/inputflinger/InputReaderBase.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/services/inputflinger/InputReaderBase.cpp b/services/inputflinger/InputReaderBase.cpp
index 2d6f2c1cc9..0422d8342b 100644
--- a/services/inputflinger/InputReaderBase.cpp
+++ b/services/inputflinger/InputReaderBase.cpp
@@ -33,6 +33,20 @@ 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) {