diff options
author | 2025-01-06 19:01:30 -0800 | |
---|---|---|
committer | 2025-01-06 19:01:30 -0800 | |
commit | fe2b11894edabe747dba416bb682c307d9222849 (patch) | |
tree | 36f3ed4bd1795b6cf8c89bf48c3096681cb1b07c | |
parent | cc0ce1cd1c0d8e96e8f7a236ba16ad7c54ba87df (diff) | |
parent | 03c58c3e5479272fd53af52b9cdcf836f295940b (diff) |
Merge "libbinder: remove obsolete getBlobAshmemSize" into main am: 1656f6ba83 am: 03c58c3e54
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/3434384
Change-Id: I6419d7c5698c36b4087d80c607212f677561ff7c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r-- | libs/binder/Parcel.cpp | 8 | ||||
-rw-r--r-- | libs/binder/include/binder/Parcel.h | 9 |
2 files changed, 5 insertions, 12 deletions
diff --git a/libs/binder/Parcel.cpp b/libs/binder/Parcel.cpp index a0ae93f56f..c0ebee006b 100644 --- a/libs/binder/Parcel.cpp +++ b/libs/binder/Parcel.cpp @@ -3389,14 +3389,6 @@ void Parcel::scanForFds() const { } #ifdef BINDER_WITH_KERNEL_IPC -size_t Parcel::getBlobAshmemSize() const -{ - // This used to return the size of all blobs that were written to ashmem, now we're returning - // the ashmem currently referenced by this Parcel, which should be equivalent. - // TODO(b/202029388): Remove method once ABI can be changed. - return getOpenAshmemSize(); -} - size_t Parcel::getOpenAshmemSize() const { auto* kernelFields = maybeKernelFields(); diff --git a/libs/binder/include/binder/Parcel.h b/libs/binder/include/binder/Parcel.h index 988f490e45..6c4c6fe573 100644 --- a/libs/binder/include/binder/Parcel.h +++ b/libs/binder/include/binder/Parcel.h @@ -1488,14 +1488,15 @@ public: * Note: for historical reasons, this does not include ashmem memory which * is referenced by this Parcel, but which this parcel doesn't own (e.g. * writeFileDescriptor is called without 'takeOwnership' true). + * + * WARNING: you should not use this, but rather, unparcel, and inspect + * each FD independently. This counts ashmem size, but there may be + * other resources used for non-ashmem FDs, such as other types of + * shared memory, files, etc.. */ LIBBINDER_EXPORTED size_t getOpenAshmemSize() const; private: - // TODO(b/202029388): Remove 'getBlobAshmemSize' once no prebuilts reference - // this - LIBBINDER_EXPORTED size_t getBlobAshmemSize() const; - // Needed so that we can save object metadata to the disk friend class android::binder::debug::RecordedTransaction; }; |