libbinder: add makeDefaultRpcTransportCtxFactory
Add a new OS-specific function that creates a new
instance of the default RpcTransportCtxFactory.
This is needed because Android and Trusty have
different default transports: RpcTransportRaw and
RpcTransportTipcTrusty, respectively.
Bug: 230135749
Test: presubmit
Change-Id: I4abd443fe9a08c1fa0cc41dfca7ef1cdb69fe0fb
diff --git a/libs/binder/OS.h b/libs/binder/OS.h
index d6e1c78..5ab8bab 100644
--- a/libs/binder/OS.h
+++ b/libs/binder/OS.h
@@ -20,6 +20,7 @@
#include <android-base/result.h>
#include <android-base/unique_fd.h>
+#include <binder/RpcTransport.h>
#include <utils/Errors.h>
namespace android {
@@ -30,4 +31,6 @@
status_t dupFileDescriptor(int oldFd, int* newFd);
+std::unique_ptr<RpcTransportCtxFactory> makeDefaultRpcTransportCtxFactory();
+
} // namespace android