From b1c8120b22dc6d7c89c4dcf53e8295901c5bd270 Mon Sep 17 00:00:00 2001 From: Steven Moreland Date: Fri, 5 Apr 2019 18:49:55 -0700 Subject: libbinder: Parcel.h: remove unused/internal funcs acquire_object/release_object are not used outside of libbinder. flatten_binder/unflatten_binder have changed in definition since they were implemented in the header, so they are out of sync and would lead to linking errors if they were used anyway. This is part of an effort to remove linux/android/binder.h from Parcel.h Bug: 124524556 Test: (sanity) boot Change-Id: I5633c53adf24d4217930afd7f4839dad9161e80f --- libs/binder/Parcel.cpp | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) (limited to 'libs/binder/Parcel.cpp') diff --git a/libs/binder/Parcel.cpp b/libs/binder/Parcel.cpp index 9f8c40876e..764e6c3d35 100644 --- a/libs/binder/Parcel.cpp +++ b/libs/binder/Parcel.cpp @@ -93,7 +93,7 @@ enum { BLOB_ASHMEM_MUTABLE = 2, }; -void acquire_object(const sp& proc, +static void acquire_object(const sp& proc, const flat_binder_object& obj, const void* who, size_t* outAshmemSize) { switch (obj.hdr.type) { @@ -135,12 +135,6 @@ void acquire_object(const sp& proc, ALOGD("Invalid object type 0x%08x", obj.hdr.type); } -void acquire_object(const sp& proc, - const flat_binder_object& obj, const void* who) -{ - acquire_object(proc, obj, who, nullptr); -} - static void release_object(const sp& proc, const flat_binder_object& obj, const void* who, size_t* outAshmemSize) { @@ -189,19 +183,13 @@ static void release_object(const sp& proc, ALOGE("Invalid object type 0x%08x", obj.hdr.type); } -void release_object(const sp& proc, - const flat_binder_object& obj, const void* who) -{ - release_object(proc, obj, who, nullptr); -} - inline static status_t finish_flatten_binder( const sp& /*binder*/, const flat_binder_object& flat, Parcel* out) { return out->writeObject(flat, false); } -status_t flatten_binder(const sp& /*proc*/, +static status_t flatten_binder(const sp& /*proc*/, const sp& binder, Parcel* out) { flat_binder_object obj; @@ -243,7 +231,7 @@ status_t flatten_binder(const sp& /*proc*/, return finish_flatten_binder(binder, obj, out); } -status_t flatten_binder(const sp& /*proc*/, +static status_t flatten_binder(const sp& /*proc*/, const wp& binder, Parcel* out) { flat_binder_object obj; @@ -299,7 +287,7 @@ inline static status_t finish_unflatten_binder( return NO_ERROR; } -status_t unflatten_binder(const sp& proc, +static status_t unflatten_binder(const sp& proc, const Parcel& in, sp* out) { const flat_binder_object* flat = in.readObject(false); @@ -318,7 +306,7 @@ status_t unflatten_binder(const sp& proc, return BAD_TYPE; } -status_t unflatten_binder(const sp& proc, +static status_t unflatten_binder(const sp& proc, const Parcel& in, wp* out) { const flat_binder_object* flat = in.readObject(false); -- cgit v1.2.3-59-g8ed1b