Store Connection in InputTarget and Monitor
This will replace the InputChannel. They don't both need to be shared
pointers. A lot of times, we are using InputChannel to look up the
connection. In this CL, this is simplified by using the connection
directly.
Bug: 161009324
Test: atest inputflinger_tests
Change-Id: I3fc2bbdd8c5076b5dbff5067e4fec6e45f5c3da6
diff --git a/services/inputflinger/dispatcher/Monitor.cpp b/services/inputflinger/dispatcher/Monitor.cpp
index 204791e..4e77d90 100644
--- a/services/inputflinger/dispatcher/Monitor.cpp
+++ b/services/inputflinger/dispatcher/Monitor.cpp
@@ -19,7 +19,7 @@
namespace android::inputdispatcher {
// --- Monitor ---
-Monitor::Monitor(const std::shared_ptr<InputChannel>& inputChannel, gui::Pid pid)
- : inputChannel(inputChannel), pid(pid) {}
+Monitor::Monitor(const std::shared_ptr<Connection>& connection, gui::Pid pid)
+ : connection(connection), pid(pid) {}
} // namespace android::inputdispatcher