Package-level declarations

This module contains internal utilities related to Android's binder IPC mechanism.

Types

Link copied to clipboard

Interface for binder interfaces that can be aggregated as part of other binder interfaces.

Link copied to clipboard

Base interface for IBinder interfaces that require async replies.

Link copied to clipboard

Lambda prototype that can provide a reply through the returned AsyncReplyWriter.

Link copied to clipboard

Receives replies asynchronously over an IBinder interface.

Link copied to clipboard

A lambda that writes a reply to a the given Parcel.

Link copied to clipboard

Identifies an async request.

Link copied to clipboard
class BinderContext(lifecycleOwner: LifecycleOwner, val messageDispatchFailureListener: BinderMessageDispatchFailureListener, val syncBinderTransactionScope: CoroutineScope? = null)

Groups some properties that are needed in the binder interface implementations.

Link copied to clipboard

Called when dispatching a binder transaction resulted in an Exception.

Link copied to clipboard
class KillableLifecycleOwner(parentLifecycleOwner: LifecycleOwner, mainScopeProvider: MainScopeProvider) : LifecycleOwner

LifecycleOwner which is destroyed when it catches a DeadObjectException.

Link copied to clipboard
typealias MainScopeProvider = (() -> Unit) -> Unit
Link copied to clipboard

Interface for binder interfaces that can use one way transaction.

Link copied to clipboard
abstract class RegistrationToken(val id: Int) : Parcelable

Base class for registration token.

Link copied to clipboard
class RegistrationTokenMap<T : RegistrationToken, V>(tokenFactory: (Int) -> T)

Utility class to generate unique tokens of type T and associate a value of type V to this token. Tokens are created by using the tokenFactory.

Link copied to clipboard

Thrown when remote's BinderContext.mainCoroutineScope is cancelled while an async reply is pending.

Link copied to clipboard
typealias SequencedAction = () -> Unit
Link copied to clipboard

Helper class for the receiving side on one way binder transactions.

Link copied to clipboard

The counter part of the SequencerReceiverHelper on the sender side.

Functions

Link copied to clipboard
inline fun <R> BinderMessageDispatchFailureListener.withMessageDispatchFailureListener(interfaceDescriptor: String, transactionName: String, block: () -> R): R

Calls BinderMessageDispatchFailureListener.onFailure when block throws an Exception. Any caught exception is rethrown.