binder_ndk_sys

Function AParcel_readString

Source
pub unsafe extern "C" fn AParcel_readString(
    parcel: *const AParcel,
    stringData: *mut c_void,
    allocator: AParcel_stringAllocator,
) -> binder_status_t
Expand description

Reads and allocates utf-8 string value from the next location in a non-null parcel.

Data is passed to the string allocator once the string size is known. This size includes the space for the null-terminator of this string. This allocator returns a buffer which is used as the output buffer from this read. If there is a ‘null’ string on the binder buffer, the allocator will be called with length -1.

Available since API level 29.

\param parcel the parcel to read from. \param stringData some external representation of a string. \param allocator allocator that will be called once the size of the string is known.

\return STATUS_OK on successful write.