BinderContext
Groups some properties that are needed in the binder interface implementations.
Parameters
The lifecycle owner of the binder interface.
Called on message dispatch failures.
Scope to use for performing sync binder transaction to start functions with a async reply. May be null
when the binder interface does not perform such binder transactions.
Constructors
Properties
CoroutineScope for running coroutines on an IO thread. The scope is cancelled when the lifecycleOwner
Lifecycle is destroyed.
A LifecycleOwner that shadows the lifecycleOwner
Lifecycle, which is destroyed when KillableLifecycleOwner.invokeDeathSafe catches a DeadObjectException.
Binder transactions are handled on the the binder thread pool. As such, one way transactions sent by a sender can be handled out of sequence. It just depends on the scheduling. The SequencerReceiverHelper helps solving this issue by posting actions on a thread or by resuming Continuations in sequence as sent by the sender based on a sequence ID.
The counter part of the SequencerReceiverHelper on the sender side for adding sequence IDs to the transactions.
Functions
Calls BinderMessageDispatchFailureListener.onFailure when block throws an Exception. Any caught exception is rethrown.