binder_ndk_sys

Function AServiceManager_addServiceWithFlags

Source
pub unsafe extern "C" fn AServiceManager_addServiceWithFlags(
    binder: *mut AIBinder,
    instance: *const c_char,
    flags: AServiceManager_AddServiceFlag,
) -> binder_exception_t
Expand description

This registers the service with the default service manager under this instance name. This does not take ownership of binder.

WARNING: when using this API across an APEX boundary, do not use with unstable AIDL services. TODO(b/139325195)

\param binder object to register globally with the service manager. \param instance identifier of the service. This will be used to lookup the service. \param flags an AServiceManager_AddServiceFlag enum to denote how the service should be added.

\return EX_NONE on success.