diff options
| author | 2023-11-21 07:53:05 +0000 | |
|---|---|---|
| committer | 2023-11-21 07:53:05 +0000 | |
| commit | d66061b7f960e24facd77f52c633a3b97fd89418 (patch) | |
| tree | 88b5162530d32056d7cd37e59245fb0da179ec21 /libs/binder/RpcSession.cpp | |
| parent | b029cb573e4bef5688757f3dfa129a848dfa372c (diff) | |
| parent | b59b0e832374b13f4a7ae9ec0758a20363b1c1c1 (diff) | |
Merge "Binder unique_fd" into main am: 1cc6ef1a50 am: b59b0e8323
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/2813342
Change-Id: I9df19ec5dad8d1f58a52ca0082c0c80f9c864250
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Diffstat (limited to 'libs/binder/RpcSession.cpp')
| -rw-r--r-- | libs/binder/RpcSession.cpp | 8 |
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(); |