binder_ndk_sys

Function AIBinder_Class_disableInterfaceTokenHeader

Source
pub unsafe extern "C" fn AIBinder_Class_disableInterfaceTokenHeader(
    clazz: *mut AIBinder_Class,
)
Expand description

This tells users of this class not to use a transaction header. By default, libbinder_ndk users read/write transaction headers implicitly (in the SDK, this must be manually written by android.os.Parcel#writeInterfaceToken, and it is read/checked with android.os.Parcel#enforceInterface). This method is provided in order to talk to legacy code which does not write an interface token. When this is disabled, type safety is reduced, so you must have a separate way of determining the binder you are talking to is the right type. Must be called before any instance of the class is created.

Available since API level 33.

WARNING: this API interacts badly with linkernamespaces. For correct behavior, you must use it on all instances of a class in the same process which share the same interface descriptor. In general, it is recommended you do not use this API, because it is disabling type safety.

\param clazz class to disable interface header on.