From 024727b29bd10909c2ddbb7a3cca9aa1dcec879d Mon Sep 17 00:00:00 2001 From: Andrei Homescu Date: Wed, 24 Aug 2022 23:54:59 +0000 Subject: 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 --- libs/binder/OS.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libs/binder/OS.cpp') diff --git a/libs/binder/OS.cpp b/libs/binder/OS.cpp index cc4a03ba67..24ce2bb465 100644 --- a/libs/binder/OS.cpp +++ b/libs/binder/OS.cpp @@ -17,6 +17,7 @@ #include "OS.h" #include +#include #include using android::base::ErrnoError; @@ -58,4 +59,8 @@ status_t dupFileDescriptor(int oldFd, int* newFd) { return OK; } +std::unique_ptr makeDefaultRpcTransportCtxFactory() { + return RpcTransportCtxFactoryRaw::make(); +} + } // namespace android -- cgit v1.2.3-59-g8ed1b