diff options
Diffstat (limited to 'libs/binder/RpcState.cpp')
-rw-r--r-- | libs/binder/RpcState.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/libs/binder/RpcState.cpp b/libs/binder/RpcState.cpp index aa26b91274..26a2f4fa39 100644 --- a/libs/binder/RpcState.cpp +++ b/libs/binder/RpcState.cpp @@ -19,8 +19,8 @@ #include "RpcState.h" #include <android-base/macros.h> +#include <android-base/scopeguard.h> #include <binder/BpBinder.h> -#include <binder/Functional.h> #include <binder/IPCThreadState.h> #include <binder/RpcServer.h> @@ -39,8 +39,6 @@ namespace android { -using namespace android::binder::impl; - #if RPC_FLAKE_PRONE void rpcMaybeWaitToFlake() { [[clang::no_destroy]] static std::random_device r; @@ -813,11 +811,11 @@ status_t RpcState::processCommand( origGuard = kernelBinderState->pushGetCallingSpGuard(&spGuard); } - auto guardUnguard = make_scope_guard([&]() { + base::ScopeGuard guardUnguard = [&]() { if (kernelBinderState != nullptr) { kernelBinderState->restoreGetCallingSpGuard(origGuard); } - }); + }; #endif // BINDER_WITH_KERNEL_IPC switch (command.command) { |