Function binder_ndk_sys::AParcel_readStringArray

source ·
pub unsafe extern "C" fn AParcel_readStringArray(
    parcel: *const AParcel,
    arrayData: *mut c_void,
    allocator: AParcel_stringArrayAllocator,
    elementAllocator: AParcel_stringArrayElementAllocator,
) -> binder_status_t
Expand description

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

First, AParcel_stringArrayAllocator will be called with the size of the array to be read where length is the length of the array to be read from the parcel. Then, for each index i in [0, length), AParcel_stringArrayElementAllocator will be called with the length of the string to be read from the parcel. The resultant buffer from each of these calls will be filled according to the contents of the string that is read. If the string array being read is ‘null’, this will instead just pass -1 to AParcel_stringArrayAllocator.

Available since API level 29.

\param parcel the parcel to read from. \param arrayData some external representation of an array. \param allocator the callback that will be called with arrayData once the size of the output array is known. \param elementAllocator the callback that will be called on every index of arrayData to allocate the string at that location.

\return STATUS_OK on successful read.