Skip to content

Commit 1656f6b

Browse files
Treehugger RobotGerrit Code Review
authored andcommitted
Merge "libbinder: remove obsolete getBlobAshmemSize" into main
2 parents e963fbd + 3494c4f commit 1656f6b

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
@@ -3279,14 +3279,6 @@ void Parcel::scanForFds() const {
32793279
}
32803280

32813281
#ifdef BINDER_WITH_KERNEL_IPC
3282-
size_t Parcel::getBlobAshmemSize() const
3283-
{
3284-
// This used to return the size of all blobs that were written to ashmem, now we're returning
3285-
// the ashmem currently referenced by this Parcel, which should be equivalent.
3286-
// TODO(b/202029388): Remove method once ABI can be changed.
3287-
return getOpenAshmemSize();
3288-
}
3289-
32903282
size_t Parcel::getOpenAshmemSize() const
32913283
{
32923284
auto* kernelFields = maybeKernelFields();

libs/binder/include/binder/Parcel.h

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

14881493
private:
1489-
// TODO(b/202029388): Remove 'getBlobAshmemSize' once no prebuilts reference
1490-
// this
1491-
LIBBINDER_EXPORTED size_t getBlobAshmemSize() const;
1492-
14931494
// Needed so that we can save object metadata to the disk
14941495
friend class android::binder::debug::RecordedTransaction;
14951496
};

0 commit comments

Comments
 (0)