Revert "Reland "Let InputReader handle its own thread""
Reason for revert: flaky tests b/144546498
Bug: 144546498
Change-Id: Id5a4c8dc8e634b23b560dde6843b5a5860305e5f
diff --git a/services/inputflinger/reader/include/InputReader.h b/services/inputflinger/reader/include/InputReader.h
index 3cf4535..7b4321e 100644
--- a/services/inputflinger/reader/include/InputReader.h
+++ b/services/inputflinger/reader/include/InputReader.h
@@ -38,12 +38,12 @@
* that it sends to the input listener. Some functions of the input reader, such as early
* event filtering in low power states, are controlled by a separate policy object.
*
- * The InputReader owns a collection of InputMappers. InputReader starts its own thread, where
- * most of the work happens, but the InputReader can receive queries from other system
+ * The InputReader owns a collection of InputMappers. Most of the work it does happens
+ * on the input reader thread but the InputReader can receive queries from other system
* components running on arbitrary threads. To keep things manageable, the InputReader
* uses a single Mutex to guard its state. The Mutex may be held while calling into the
* EventHub or the InputReaderPolicy but it is never held while calling into the
- * InputListener. All calls to InputListener must happen from InputReader's thread.
+ * InputListener.
*/
class InputReader : public InputReaderInterface {
public:
@@ -55,8 +55,7 @@
virtual void dump(std::string& dump) override;
virtual void monitor() override;
- virtual status_t start() override;
- virtual status_t stop() override;
+ virtual void loopOnce() override;
virtual void getInputDevices(std::vector<InputDeviceInfo>& outInputDevices) override;
@@ -112,9 +111,6 @@
friend class ContextImpl;
private:
- class InputReaderThread;
- sp<InputReaderThread> mThread;
-
Mutex mLock;
Condition mReaderIsAliveCondition;
@@ -137,10 +133,6 @@
KeyedVector<int32_t, InputDevice*> mDevices;
- // With each iteration of the loop, InputReader reads and processes one incoming message from
- // the EventHub.
- void loopOnce();
-
// low-level input event decoding and device management
void processEventsLocked(const RawEvent* rawEvents, size_t count);