AsyncReplyReceiver
Receives replies asynchronously over an IBinder interface.
Normally, IBinder interfaces are synchronous. The calling thread is blocked until a reply is received. To allow suspendable functions in IVI services, the replies of suspendable functions should not block the calling thread. As such, the generated code uses this class to send the replies back asynchronously.
On the client side, the coroutine is suspended until the async reply is retrieved. On the server side, a coroutine is launched and the calling binder call is returned directly. The launched coroutine can send a reply back to the client.
Only the Stub.Proxy (on the server side) implements this interface. The Stub (on the client side) provides a Stub.sendAndWaitForReply instead as a utility function to send a message and wait for the reply asynchronously.
The aidl
tool is not used as it doesn't support Kotlin coroutines. The inner classes follow as much as possible the structure of the code generated by the aidl
tool.
Inheritors
Types
Functions
Invokes a suspendable asyncReplyProvider and sends the reply asynchronously.