Rewrite input transport using sockets.

Since we will not longer be modifying events in place, we don't need
to use an ashmem region for input.  Simplified the code to instead
use a socket of type SOCK_SEQPACKET.

This is part of a series of changes to improve input system pipelining.

Bug: 5963420

Change-Id: I05909075ed8b61b93900913e44c6db84857340d8
diff --git a/services/input/InputDispatcher.h b/services/input/InputDispatcher.h
index 7a2839f..e593c25 100644
--- a/services/input/InputDispatcher.h
+++ b/services/input/InputDispatcher.h
@@ -807,8 +807,6 @@
         inline double getDispatchLatencyMillis(nsecs_t currentTime) const {
             return (currentTime - lastDispatchTime) / 1000000.0;
         }
-
-        status_t initialize();
     };
 
     enum DropReason {
@@ -862,8 +860,8 @@
 
     sp<InputWindowHandle> findTouchedWindowAtLocked(int32_t x, int32_t y);
 
-    // All registered connections mapped by receive pipe file descriptor.
-    KeyedVector<int, sp<Connection> > mConnectionsByReceiveFd;
+    // All registered connections mapped by channel file descriptor.
+    KeyedVector<int, sp<Connection> > mConnectionsByFd;
 
     ssize_t getConnectionIndexLocked(const sp<InputChannel>& inputChannel);
 
@@ -1027,7 +1025,7 @@
     void abortBrokenDispatchCycleLocked(nsecs_t currentTime, const sp<Connection>& connection,
             bool notify);
     void drainOutboundQueueLocked(Connection* connection);
-    static int handleReceiveCallback(int receiveFd, int events, void* data);
+    static int handleReceiveCallback(int fd, int events, void* data);
 
     void synthesizeCancelationEventsForAllConnectionsLocked(
             const CancelationOptions& options);