Skip to content

Commit fe2b118

Browse files
Treehugger Robotandroid-build-merge-worker-robot
authored andcommitted
Merge "libbinder: remove obsolete getBlobAshmemSize" into main am: 1656f6b am: 03c58c3
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>
2 parents cc0ce1c + 03c58c3 commit fe2b118

2 files changed

Lines changed: 5 additions & 12 deletions

File tree

libs/binder/Parcel.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3389,14 +3389,6 @@ void Parcel::scanForFds() const {
33893389
}
33903390

33913391
#ifdef BINDER_WITH_KERNEL_IPC
3392-
size_t Parcel::getBlobAshmemSize() const
3393-
{
3394-
// This used to return the size of all blobs that were written to ashmem, now we're returning
3395-
// the ashmem currently referenced by this Parcel, which should be equivalent.
3396-
// TODO(b/202029388): Remove method once ABI can be changed.
3397-
return getOpenAshmemSize();
3398-
}
3399-
34003392
size_t Parcel::getOpenAshmemSize() const
34013393
{
34023394
auto* kernelFields = maybeKernelFields();

libs/binder/include/binder/Parcel.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1488,14 +1488,15 @@ class Parcel {
14881488
* Note: for historical reasons, this does not include ashmem memory which
14891489
* is referenced by this Parcel, but which this parcel doesn't own (e.g.
14901490
* writeFileDescriptor is called without 'takeOwnership' true).
1491+
*
1492+
* WARNING: you should not use this, but rather, unparcel, and inspect
1493+
* each FD independently. This counts ashmem size, but there may be
1494+
* other resources used for non-ashmem FDs, such as other types of
1495+
* shared memory, files, etc..
14911496
*/
14921497
LIBBINDER_EXPORTED size_t getOpenAshmemSize() const;
14931498

14941499
private:
1495-
// TODO(b/202029388): Remove 'getBlobAshmemSize' once no prebuilts reference
1496-
// this
1497-
LIBBINDER_EXPORTED size_t getBlobAshmemSize() const;
1498-
14991500
// Needed so that we can save object metadata to the disk
15001501
friend class android::binder::debug::RecordedTransaction;
15011502
};

0 commit comments

Comments
 (0)