binder_ndk_sys

Function ABinderRpc_Accessor_fromBinder

Source
pub unsafe extern "C" fn ABinderRpc_Accessor_fromBinder(
    instance: *const c_char,
    accessorBinder: *mut AIBinder,
) -> *mut ABinderRpc_Accessor
Expand description

Return the ABinderRpc_Accessor associated with an AIBinder. The instance must match the ABinderRpc_Accessor implementation. This can be used when receiving an AIBinder from another process that the other process obtained from ABinderRpc_Accessor_asBinder.

\param instance name of the service that the Accessor is responsible for. This string must remain valid and unchanged for the duration of this function call. \param accessorBinder proxy binder from another process’s ABinderRpc_Accessor. This function preserves the refcount of this binder object and the caller still owns it. \return ABinderRpc_Accessor representing the other processes ABinderRpc_Accessor implementation. The caller owns this ABinderRpc_Accessor instance and is responsible for deleting it with ABinderRpc_Accessor_delete or passing ownership of it elsewhere, like returning it through ABinderRpc_AccessorProvider_getAccessorCallback. nullptr on error when the accessorBinder is not a valid binder from an IAccessor implementation or the IAccessor implementation is not associated with the provided instance.