summaryrefslogtreecommitdiff
path: root/libs/binder/ProcessState.cpp
diff options
context:
space:
mode:
author Steven Moreland <smoreland@google.com> 2021-03-25 00:58:07 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2021-03-25 00:58:07 +0000
commitab1098bffa53daa35561f19c8191a5cbccc406d9 (patch)
treedd649ba1eed45dceb915d1ada4ec3bd762ea9d84 /libs/binder/ProcessState.cpp
parenta616da92502226b3090fd83a186549f1a225a82b (diff)
parent974deb9f133ea578149ab411cb99f07d8e061ab4 (diff)
Merge "libbinder: support calls over sockets" am: 4e83ba78f1 am: 32d689ec04 am: 974deb9f13
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/1495200 Change-Id: Iab4e34da339d1ac33519efd5aff8b893f5b57d1c
Diffstat (limited to 'libs/binder/ProcessState.cpp')
-rw-r--r--libs/binder/ProcessState.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/libs/binder/ProcessState.cpp b/libs/binder/ProcessState.cpp
index edadcd5c58..abb792eda0 100644
--- a/libs/binder/ProcessState.cpp
+++ b/libs/binder/ProcessState.cpp
@@ -205,10 +205,12 @@ ssize_t ProcessState::getKernelReferences(size_t buf_count, uintptr_t* buf)
//
// Returns -1 in case of failure, otherwise the strong reference count.
ssize_t ProcessState::getStrongRefCountForNode(const sp<BpBinder>& binder) {
+ if (binder->isRpcBinder()) return -1;
+
binder_node_info_for_ref info;
memset(&info, 0, sizeof(binder_node_info_for_ref));
- info.handle = binder->getPrivateAccessorForHandle().handle();
+ info.handle = binder->getPrivateAccessorForId().binderHandle();
status_t result = ioctl(mDriverFD, BINDER_GET_NODE_INFO_FOR_REF, &info);