summaryrefslogtreecommitdiff
path: root/libs/binder/IInterface.cpp
diff options
context:
space:
mode:
author Steven Moreland <smoreland@google.com> 2021-04-12 21:09:03 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2021-04-12 21:09:03 +0000
commitd5cc17b3b45f32f1a74d963b2c59e39a12c46675 (patch)
treeb9331e64756e73b847d0996f1c4ab8c28c767e39 /libs/binder/IInterface.cpp
parent369abe010a738a5c5e841cfeac82bd0fca7bfb1c (diff)
parent1a3a8effca802995ece193b7d40cd80abba55798 (diff)
Merge "libbinder use stronger refbase semantics"
Diffstat (limited to 'libs/binder/IInterface.cpp')
-rw-r--r--libs/binder/IInterface.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/binder/IInterface.cpp b/libs/binder/IInterface.cpp
index b19004d454..2780bd4cd9 100644
--- a/libs/binder/IInterface.cpp
+++ b/libs/binder/IInterface.cpp
@@ -33,14 +33,14 @@ IInterface::~IInterface() {
sp<IBinder> IInterface::asBinder(const IInterface* iface)
{
if (iface == nullptr) return nullptr;
- return const_cast<IInterface*>(iface)->onAsBinder();
+ return sp<IBinder>::fromExisting(const_cast<IInterface*>(iface)->onAsBinder());
}
// static
sp<IBinder> IInterface::asBinder(const sp<IInterface>& iface)
{
if (iface == nullptr) return nullptr;
- return iface->onAsBinder();
+ return sp<IBinder>::fromExisting(iface->onAsBinder());
}