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/ProcessState.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/ProcessState.cpp')
-rw-r--r-- | libs/binder/ProcessState.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libs/binder/ProcessState.cpp b/libs/binder/ProcessState.cpp index 0344eb04d6..7de94e3c6c 100644 --- a/libs/binder/ProcessState.cpp +++ b/libs/binder/ProcessState.cpp @@ -61,6 +61,7 @@ const char* kDefaultDriver = "/dev/binder"; namespace android { using namespace android::binder::impl; +using android::binder::unique_fd; class PoolThread : public Thread { @@ -514,8 +515,8 @@ String8 ProcessState::getDriverName() { return mDriverName; } -static base::unique_fd open_driver(const char* driver) { - auto fd = base::unique_fd(open(driver, O_RDWR | O_CLOEXEC)); +static unique_fd open_driver(const char* driver) { + auto fd = unique_fd(open(driver, O_RDWR | O_CLOEXEC)); if (!fd.ok()) { PLOGE("Opening '%s' failed", driver); return {}; @@ -563,7 +564,7 @@ ProcessState::ProcessState(const char* driver) mThreadPoolStarted(false), mThreadPoolSeq(1), mCallRestriction(CallRestriction::NONE) { - base::unique_fd opened = open_driver(driver); + unique_fd opened = open_driver(driver); if (opened.ok()) { // mmap the binder, providing a chunk of virtual address space to receive transactions. |