@@ -27,6 +27,7 @@ Additionally, the dispatcher supports the following:
* Subscriptions can be done in any thread.
* Broadcasts will be dispatched on the main thread (same as `system_server`) by default but a `Handler` can be specified for dispatching
* A `UserHandle` can be provided to filter the broadcasts by user.
* Flags (see [`Context#RegisterReceiverFlags`](/core/java/android/content/Context.java)) can be passed for the registration. By default, this will be `Context#RECEIVER_EXPORTED`.
If introducing a new `BroadcastReceiver` (not declared in `AndroidManifest`) that satisfies the constraints above, use the dispatcher to reduce the load on `system_server`.
@@ -63,6 +64,8 @@ Acquire the dispatcher by using `@Inject` to obtain a `BroadcastDispatcher`. The
* executor in the main thread (default).
* @param user A user handle to determine which broadcast should be dispatched to this receiver.
* Pass `null` to use the user of the context (system user in SystemUI).
* @param flags Flags to use when registering the receiver. [Context.RECEIVER_EXPORTED] by
* default.
* @throws IllegalArgumentException if the filter has other constraints that are not actions or