summaryrefslogtreecommitdiff
path: root/libs/binder/OS.cpp
diff options
context:
space:
mode:
author Andrei Homescu <ahomescu@google.com> 2022-08-24 23:54:59 +0000
committer Andrei Homescu <ahomescu@google.com> 2022-08-25 00:00:24 +0000
commit024727b29bd10909c2ddbb7a3cca9aa1dcec879d (patch)
tree1cbcc35097e6c836eab8a3f9cb4a5e1c7a61d82d /libs/binder/OS.cpp
parentb125642ba6af3bb96a466c42f7161e85339f5dc9 (diff)
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
Diffstat (limited to 'libs/binder/OS.cpp')
-rw-r--r--libs/binder/OS.cpp5
1 files changed, 5 insertions, 0 deletions
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 <android-base/file.h>
+#include <binder/RpcTransportRaw.h>
#include <string.h>
using android::base::ErrnoError;
@@ -58,4 +59,8 @@ status_t dupFileDescriptor(int oldFd, int* newFd) {
return OK;
}
+std::unique_ptr<RpcTransportCtxFactory> makeDefaultRpcTransportCtxFactory() {
+ return RpcTransportCtxFactoryRaw::make();
+}
+
} // namespace android