binder RPC add IP address argument when setting up Inet socket
This allows connections on any IP address that the device has.
127.0.0.1 only allows local connections.
Test: test remote connection across two different devices with static ip
of 10.10.10.2
Test: m servicedispatcher
Test: atest binderRpcTest binderLibTest
Change-Id: Idaa61875dadb5196006faddb13e55fdd8a379d52
diff --git a/libs/binder/tests/binderLibTest.cpp b/libs/binder/tests/binderLibTest.cpp
index 4c3225f..65db7f6 100644
--- a/libs/binder/tests/binderLibTest.cpp
+++ b/libs/binder/tests/binderLibTest.cpp
@@ -1192,7 +1192,7 @@
if (rpcServer == nullptr) return {};
rpcServer->iUnderstandThisCodeIsExperimentalAndIWillNotUseItInProduction();
unsigned int port;
- if (!rpcServer->setupInetServer(0, &port)) {
+ if (!rpcServer->setupInetServer("127.0.0.1", 0, &port)) {
ADD_FAILURE() << "setupInetServer failed";
return {};
}