summaryrefslogtreecommitdiff
path: root/libs/binder/Parcel.cpp
diff options
context:
space:
mode:
author Tomasz Wasilczyk <twasilczyk@google.com> 2023-11-05 20:36:11 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2023-11-05 20:36:11 +0000
commitdc0f937ddfb068670a0c8ea3d32d0d0247b641e0 (patch)
treef79d86a6d691c5b6e6f05ffeb58f184aed740a0e /libs/binder/Parcel.cpp
parent6c7467787a3f2d5d2228837dada5be137633667f (diff)
parent35804862d172226835319327457270396dd6d71d (diff)
Merge changes from topic "revert-2807644-revert-2780893-XRITMVSTFB-ZYEEKMIRIQ" into main
* changes: Revert^2 "Use std::function instead of base::function_ref" Revert^2 "Use std::unique_ptr instead of ScopeGuard"
Diffstat (limited to 'libs/binder/Parcel.cpp')
-rw-r--r--libs/binder/Parcel.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/libs/binder/Parcel.cpp b/libs/binder/Parcel.cpp
index 94851c63b5..94f3631b79 100644
--- a/libs/binder/Parcel.cpp
+++ b/libs/binder/Parcel.cpp
@@ -33,6 +33,7 @@
#include <binder/Binder.h>
#include <binder/BpBinder.h>
+#include <binder/Functional.h>
#include <binder/IPCThreadState.h>
#include <binder/Parcel.h>
#include <binder/ProcessState.h>
@@ -40,7 +41,6 @@
#include <binder/Status.h>
#include <binder/TextOutput.h>
-#include <android-base/scopeguard.h>
#ifndef BINDER_DISABLE_BLOB
#include <cutils/ashmem.h>
#endif
@@ -92,6 +92,8 @@ static size_t pad_size(size_t s) {
namespace android {
+using namespace android::binder::impl;
+
// many things compile this into prebuilts on the stack
#ifdef __LP64__
static_assert(sizeof(Parcel) == 120);
@@ -584,7 +586,7 @@ status_t Parcel::appendFrom(const Parcel* parcel, size_t offset, size_t len) {
}
const size_t savedDataPos = mDataPos;
- base::ScopeGuard scopeGuard = [&]() { mDataPos = savedDataPos; };
+ auto scopeGuard = make_scope_guard([&]() { mDataPos = savedDataPos; });
rpcFields->mObjectPositions.reserve(otherRpcFields->mObjectPositions.size());
if (otherRpcFields->mFds != nullptr) {