Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 56ce1c06 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "libbinder*: clarify setDataPosition constraints" am: f967183e am:...

Merge "libbinder*: clarify setDataPosition constraints" am: f967183e am: b7d6548f am: c7752dcd am: 653d1419 am: 7e4f806d

Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/2101835



Change-Id: I20d31bce788f3e5d4cf6fb1eeca49e2e37e6be81
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents adb680cc 7e4f806d
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -76,6 +76,11 @@ public:
    size_t              dataCapacity() const;

    status_t            setDataSize(size_t size);

    // this must only be used to set a data position that was previously returned from
    // dataPosition(). If writes are made, the exact same types of writes must be made (e.g.
    // auto i = p.dataPosition(); p.writeInt32(0); p.setDataPosition(i); p.writeInt32(1);).
    // Writing over objects, such as file descriptors and binders, is not supported.
    void                setDataPosition(size_t pos) const;
    status_t            setDataCapacity(size_t size);

+5 −0
Original line number Diff line number Diff line
@@ -59,6 +59,11 @@ void AParcel_delete(AParcel* parcel) __INTRODUCED_IN(29);
/**
 * Sets the position within the parcel.
 *
 * This must be called with a position that has been previously returned from
 * AParcel_getDataPosition. If writes are made after setting the data position, they must
 * be made in the exact same sequence used before resetting data position. Writing over
 * objects such as binders or file descriptors is not supported.
 *
 * Available since API level 29.
 *
 * \param parcel The parcel of which to set the position.