From 2a9f32f1a21e012dfaddc571a741658eaef0d9da Mon Sep 17 00:00:00 2001 From: Steven Moreland Date: Wed, 31 Jul 2019 17:51:25 -0700 Subject: Set stability for unset interfaces. This specifically has handwritten interfaces in mind. This CL ensures that if there is a handwritten interface, it'll be marked with 'local' stability before it is sent out. This means that a handwritten interface won't accidentally be interpretted as a stable interface. Bug: 136027762 Test: boot Merged-In: I97e3e7c72f99e12dbf00996ff0c68fb683f3c494 Change-Id: I97e3e7c72f99e12dbf00996ff0c68fb683f3c494 --- libs/binder/Parcel.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'libs/binder/Parcel.cpp') diff --git a/libs/binder/Parcel.cpp b/libs/binder/Parcel.cpp index 51ca7b4f02..a2333ae07e 100644 --- a/libs/binder/Parcel.cpp +++ b/libs/binder/Parcel.cpp @@ -167,6 +167,8 @@ static void release_object(const sp& proc, status_t Parcel::finishFlattenBinder( const sp& /*binder*/, const flat_binder_object& flat) { + // internal::Stability::tryMarkCompilationUnit(binder.get()); + status_t status = writeObject(flat, false); if (status != OK) return status; @@ -183,11 +185,11 @@ status_t Parcel::finishUnflattenBinder( // status_t status = readInt32(&stability); // if (status != OK) return status; - // if (!internal::Stability::check(stability, mRequiredStability)) { + // if (binder != nullptr && !internal::Stability::check(stability, mRequiredStability)) { // return BAD_TYPE; // } - // status = internal::Stability::set(binder.get(), stability); + // status = internal::Stability::set(binder.get(), stability, true /*log*/); // if (status != OK) return status; *out = binder; -- cgit v1.2.3-59-g8ed1b