Function binder_ndk_sys::AParcel_setDataPosition

source ยท
pub unsafe extern "C" fn AParcel_setDataPosition(
    parcel: *const AParcel,
    position: i32,
) -> binder_status_t
Expand description

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. \param position Position of the parcel to set. This must be a value returned by AParcel_getDataPosition. Positions are constant for a given parcel between processes.

\return STATUS_OK on success. If position is negative, then STATUS_BAD_VALUE will be returned.