summaryrefslogtreecommitdiff
path: root/libs/binder/ProcessState.cpp
diff options
context:
space:
mode:
author Steven Moreland <smoreland@google.com> 2021-03-25 00:06:53 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2021-03-25 00:06:53 +0000
commit974deb9f133ea578149ab411cb99f07d8e061ab4 (patch)
tree4a2c43f88f8336206d84b26a688306e05816c26d /libs/binder/ProcessState.cpp
parentc8b582fc81a8db189cdad421d83ff40dec079aec (diff)
parent32d689ec041c1b2af1edd3bab692d92726504078 (diff)
Merge "libbinder: support calls over sockets" am: 4e83ba78f1 am: 32d689ec04
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/1495200 Change-Id: I79e3c4205b29dab216832b155a030f8d0e16eaf5
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 c38249ef7c..82f6faf7a1 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);