Revert "Use std::unique_ptr instead of ScopeGuard"

Revert submission 2780893

Reason for revert: breaking boot tests

Bug: 308214260

Reverted changes: /q/submissionid:2780893

Change-Id: I7a4ee9a45583a8a1d4a33447de55c63e6ce9d42a
diff --git a/libs/binder/Parcel.cpp b/libs/binder/Parcel.cpp
index 0ff29b5..17bdc45 100644
--- a/libs/binder/Parcel.cpp
+++ b/libs/binder/Parcel.cpp
@@ -32,7 +32,6 @@
 
 #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,6 +39,7 @@
 #include <binder/Status.h>
 #include <binder/TextOutput.h>
 
+#include <android-base/scopeguard.h>
 #ifndef BINDER_DISABLE_BLOB
 #include <cutils/ashmem.h>
 #endif
@@ -94,8 +94,6 @@
 
 namespace android {
 
-using namespace android::binder::impl;
-
 // many things compile this into prebuilts on the stack
 #ifdef __LP64__
 static_assert(sizeof(Parcel) == 120);
@@ -588,7 +586,7 @@
         }
 
         const size_t savedDataPos = mDataPos;
-        auto scopeGuard = make_scope_guard([&]() { mDataPos = savedDataPos; });
+        base::ScopeGuard scopeGuard = [&]() { mDataPos = savedDataPos; };
 
         rpcFields->mObjectPositions.reserve(otherRpcFields->mObjectPositions.size());
         if (otherRpcFields->mFds != nullptr) {