summaryrefslogtreecommitdiff
path: root/libs/binder/Parcel.cpp
diff options
context:
space:
mode:
author Steven Moreland <smoreland@google.com> 2019-07-31 17:51:25 -0700
committer Steven Moreland <smoreland@google.com> 2019-08-02 20:34:44 -0700
commit2a9f32f1a21e012dfaddc571a741658eaef0d9da (patch)
tree90423b51ab1506416e1e114fcbe9dd690e499fda /libs/binder/Parcel.cpp
parentbec7c58e8c98d4517296e7001dbafe414a993f2e (diff)
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
Diffstat (limited to 'libs/binder/Parcel.cpp')
-rw-r--r--libs/binder/Parcel.cpp6
1 files changed, 4 insertions, 2 deletions
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<ProcessState>& proc,
status_t Parcel::finishFlattenBinder(
const sp<IBinder>& /*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;