From 1a3a8effca802995ece193b7d40cd80abba55798 Mon Sep 17 00:00:00 2001 From: Steven Moreland Date: Fri, 2 Apr 2021 02:52:46 +0000 Subject: libbinder use stronger refbase semantics As a larger example of how to use ANDROID_UTILS_REF_BASE_DISABLE_IMPLICIT_CONSTRUCTION. Bug: 184190315 Test: boot (relevant tests in TEST_MAPPING) Change-Id: I88283543e1f63fd1010f9cd3f63baefec84e6a84 --- libs/binder/Parcel.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libs/binder/Parcel.cpp') diff --git a/libs/binder/Parcel.cpp b/libs/binder/Parcel.cpp index b1dddd14ec..98ca829031 100644 --- a/libs/binder/Parcel.cpp +++ b/libs/binder/Parcel.cpp @@ -293,7 +293,8 @@ status_t Parcel::unflattenBinder(sp* out) const if (flat) { switch (flat->hdr.type) { case BINDER_TYPE_BINDER: { - sp binder = reinterpret_cast(flat->cookie); + sp binder = + sp::fromExisting(reinterpret_cast(flat->cookie)); return finishUnflattenBinder(binder, out); } case BINDER_TYPE_HANDLE: { -- cgit v1.2.3-59-g8ed1b