Function binder_ndk_sys::AIBinder_associateClass

source ยท
pub unsafe extern "C" fn AIBinder_associateClass(
    binder: *mut AIBinder,
    clazz: *const AIBinder_Class,
) -> bool
Expand description

This sets the class of an AIBinder object. This checks to make sure the remote object is of the expected class. A class must be set in order to use transactions on an AIBinder object. However, if an object is just intended to be passed through to another process or used as a handle this need not be called.

This returns true if the class association succeeds. If it fails, no change is made to the binder object.

Warning: this may fail if the binder is dead.

Available since API level 29.

\param binder the object to attach the class to. \param clazz the clazz to attach to binder.

\return true if the binder has the class clazz and if the association was successful.