summaryrefslogtreecommitdiff
path: root/libs/binder/RpcSession.cpp
diff options
context:
space:
mode:
author Tomasz Wasilczyk <twasilczyk@google.com> 2023-11-01 13:49:41 -0700
committer Tomasz Wasilczyk <twasilczyk@google.com> 2023-11-17 14:35:23 -0800
commit639490b9ec6535cda7f24403237355c941e9fcb2 (patch)
treec3554b2f347302ee5ffb08ca0ee84b2fdb6f3db4 /libs/binder/RpcSession.cpp
parent8f33166621a04db00e1c0ec6d67884bc0b7f8849 (diff)
Binder unique_fd
Test: mma Bug: 302723053 Change-Id: I52f14cadb027b3f854946d5315dce3d23aa21b19
Diffstat (limited to 'libs/binder/RpcSession.cpp')
-rw-r--r--libs/binder/RpcSession.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/libs/binder/RpcSession.cpp b/libs/binder/RpcSession.cpp
index cd8f41711f..16a7f9fd48 100644
--- a/libs/binder/RpcSession.cpp
+++ b/libs/binder/RpcSession.cpp
@@ -51,7 +51,8 @@ extern "C" JavaVM* AndroidRuntimeGetJavaVM();
namespace android {
using namespace android::binder::impl;
-using base::unique_fd;
+using android::binder::borrowed_fd;
+using android::binder::unique_fd;
RpcSession::RpcSession(std::unique_ptr<RpcTransportCtx> ctx) : mCtx(std::move(ctx)) {
LOG_RPC_DETAIL("RpcSession created %p", this);
@@ -157,7 +158,7 @@ status_t RpcSession::setupUnixDomainSocketBootstrapClient(unique_fd bootstrapFd)
int zero = 0;
iovec iov{&zero, sizeof(zero)};
- std::vector<std::variant<base::unique_fd, base::borrowed_fd>> fds;
+ std::vector<std::variant<unique_fd, borrowed_fd>> fds;
fds.push_back(std::move(serverFd));
status_t status = mBootstrapTransport->interruptableWriteFully(mShutdownTrigger.get(), &iov,
@@ -186,8 +187,7 @@ status_t RpcSession::setupInetClient(const char* addr, unsigned int port) {
return NAME_NOT_FOUND;
}
-status_t RpcSession::setupPreconnectedClient(base::unique_fd fd,
- std::function<unique_fd()>&& request) {
+status_t RpcSession::setupPreconnectedClient(unique_fd fd, std::function<unique_fd()>&& request) {
return setupClient([&](const std::vector<uint8_t>& sessionId, bool incoming) -> status_t {
if (!fd.ok()) {
fd = request();