diff options
| author | 2023-11-21 07:22:38 +0000 | |
|---|---|---|
| committer | 2023-11-21 07:22:38 +0000 | |
| commit | b59b0e832374b13f4a7ae9ec0758a20363b1c1c1 (patch) | |
| tree | 041c3ffe1d69d9fbce7f5e3a3d720a15f2e87e8c /libs/binder/ProcessState.cpp | |
| parent | d3fd49265e32d3f7b9ed701d090a50054d6e6d86 (diff) | |
| parent | 1cc6ef1a500584cfc3a3e9140a8bec08e506b47a (diff) | |
Merge "Binder unique_fd" into main am: 1cc6ef1a50
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/2813342
Change-Id: I0e3fdaf290a4a1124bb5ba40d911d88d825cb1e2
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. |