diff options
author | Martijn Coenen <maco@google.com> | 2018-09-07 10:41:33 +0200 |
---|---|---|
committer | Steven Moreland <smoreland@google.com> | 2018-09-27 11:16:58 -0700 |
commit | 320e1d3dec0aea5701fc3b860ea1ffdf33241115 (patch) | |
tree | 22f57ee1317712c72cb0c75e1a7ccf4606ef237f /BpHwBinder.cpp | |
parent | 81dbdeedbad9bc3a497eb33f44ed3aabf5c7e416 (diff) | |
download | libhwbinder-320e1d3dec0aea5701fc3b860ea1ffdf33241115.tar.gz |
Add getNodeStrongRefCount() to BpHwBinder.
So that the servicemanager can query the current strong refcount
on the node that the BpHwBinder refers to.
Bug: 79983843
Test: builds, refcount returned is correct
Change-Id: I8bcedd55d1a2b987d3888da25e2d4d499cff9655
Diffstat (limited to 'BpHwBinder.cpp')
-rw-r--r-- | BpHwBinder.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/BpHwBinder.cpp b/BpHwBinder.cpp index 223f854..aacbc8d 100644 --- a/BpHwBinder.cpp +++ b/BpHwBinder.cpp @@ -215,6 +215,13 @@ void BpHwBinder::sendObituary() } } +// Returns the strong refcount on the object this proxy points to, or +// -1 in case of failure. +ssize_t BpHwBinder::getNodeStrongRefCount() +{ + return ProcessState::self()->getStrongRefCountForNodeByHandle(mHandle); +} + void BpHwBinder::reportOneDeath(const Obituary& obit) { sp<DeathRecipient> recipient = obit.recipient.promote(); |