summaryrefslogtreecommitdiff
path: root/services/inputflinger/InputReaderBase.cpp
diff options
context:
space:
mode:
author Prabir Pradhan <prabirmsp@google.com> 2019-11-05 01:10:04 +0000
committer Prabir Pradhan <prabirmsp@google.com> 2019-12-04 13:48:58 -0800
commit28efc19d395bca5c747d71d392dfbeccf42b00be (patch)
tree32feafb201c5d1192abfc5e8b44bc428be37b406 /services/inputflinger/InputReaderBase.cpp
parentcace66c539fc5c2c3451fa5af5c6324ddcc4e384 (diff)
Reland "Let InputReader handle its own thread"
This CL was first landed in Ic732436d4f00a831e317be1f16ac106a11652cff but was reverted due to flaky tests. The flaky tests were caused by races between the instrumented test classes and the InputReader class under test, which now runs in a new thread. In addition to re-landing the change, this CL ensures that InputReader does not start its own thread in its unit tests, but instead keep using the loopOnce method that is exposed for testing. Bug: 130819454 Test: atest inputflinger_tests Test: Touch input works on crosshatch Change-Id: I5bbfc68b6be6745efc8b7106a9292ee3cb431c9c
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) {