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/include/input/InputTransport.h b/include/input/InputTransport.h
index 8b1c2a3..d53e8c6 100644
--- a/include/input/InputTransport.h
+++ b/include/input/InputTransport.h
@@ -333,7 +333,7 @@
~InputPublisher();
/* Gets the underlying input channel. */
- inline std::shared_ptr<InputChannel> getChannel() { return mChannel; }
+ inline std::shared_ptr<InputChannel> getChannel() const { return mChannel; }
/* Publishes a key event to the input channel.
*