CallbackHandlerRegistry
public class CallbackHandlerRegistry
The holder for callbacks that are tagged with RemoteCallable. Note: This should only be referenced by generated code, there is no reason to reference this otherwise.
Summary
Nested types |
|---|
public interface CallbackHandlerRegistry.CallbackHandler<T extends CallbackReceiver>The interface used to trigger a callback when the pending intent is fired. |
Public constructors |
|---|
Public methods |
|
|---|---|
void |
<T extends CallbackReceiver> Trigger a call to a callback using arguments that were generated with |
void |
<T extends CallbackReceiver> Trigger a call to a callback using arguments that were generated with |
static void |
<T extends CallbackReceiver> Registers a callback handler to be executed when a given PendingIntent is fired for a |
static @Nullable RemoteCallback |
Turns a callback receiver stub into a remote callback. |
Public constructors
CallbackHandlerRegistry
public CallbackHandlerRegistry()Public methods
invokeCallback
public void <T extends CallbackReceiver>invokeCallback(
@NonNull Context context,
T receiver,
@NonNull Intent intent
)
Trigger a call to a callback using arguments that were generated with getArgumentBundle.
invokeCallback
public void <T extends CallbackReceiver>invokeCallback(
@NonNull Context context,
T receiver,
@NonNull Bundle bundle
)
Trigger a call to a callback using arguments that were generated with getArgumentBundle.
registerCallbackHandler
public static void <T extends CallbackReceiver>registerCallbackHandler(
@NonNull Class<T> cls,
@NonNull String method,
@Nullable CallbackHandlerRegistry.CallbackHandler<T> handler
)
Registers a callback handler to be executed when a given PendingIntent is fired for a RemoteCallback. Note: This should only be called by generated code, there is no reason to reference this otherwise.
stubToRemoteCallback
public static @Nullable RemoteCallbackstubToRemoteCallback(
@NonNull CallbackReceiver receiver,
@NonNull Class<CallbackReceiver> cls,
@NonNull Bundle args,
@Nullable String method
)
Turns a callback receiver stub into a remote callback. Note: This should only be called by generated code, there is no reason to reference this otherwise.