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/Connection.cpp b/services/inputflinger/dispatcher/Connection.cpp
index f304712..6c603d4 100644
--- a/services/inputflinger/dispatcher/Connection.cpp
+++ b/services/inputflinger/dispatcher/Connection.cpp
@@ -38,4 +38,8 @@
return "?";
}
+sp<IBinder> Connection::getToken() const {
+ return inputPublisher.getChannel()->getConnectionToken();
+};
+
} // namespace android::inputdispatcher