Updating documentation for broadcast receivers.

Forgot to propagate updated flag documentation to all versions of
register receiver, and
needed to include a link to system broadcasts (which has replaced all
instances of the term protected broadcasts).

Test: comments only, not needed
Bug: 202146686
Change-Id: I61804cd3f3738093bc8a08d2bff6c7a5a863e7f1
This commit is contained in:
Jacob Hobbie
2021-11-17 12:40:26 -08:00
parent 6c437f55aa
commit b887009f0a

View File

@@ -3004,10 +3004,11 @@ public abstract class Context {
* {@link android.os.Build.VERSION_CODES#TIRAMISU},
* either {@link #RECEIVER_EXPORTED} or
* {@link #RECEIVER_NOT_EXPORTED} must be specified if the receiver isn't being registered
* for protected broadcasts or an exception will be thrown. If
* for
* <a href="https://developer.android.com/guide/components/broadcasts#system-broadcasts">system broadcasts</a> or an exception will be thrown. If
* {@link #RECEIVER_EXPORTED} is specified, a receiver may additionally
* specify {@link #RECEIVER_VISIBLE_TO_INSTANT_APPS}. For a complete list of
* protected broadcast actions, see the BROADCAST_ACTIONS.TXT file in the
* system broadcast actions, see the BROADCAST_ACTIONS.TXT file in the
* Android SDK. If both {@link #RECEIVER_EXPORTED} and
* {@link #RECEIVER_NOT_EXPORTED} are specified, an exception will be thrown as
* well.
@@ -3082,12 +3083,18 @@ public abstract class Context {
* no permission is required.
* @param scheduler Handler identifying the thread that will receive
* the Intent. If null, the main thread of the process will be used.
* @param flags Additional options for the receiver. As of
* Android T, either {@link #RECEIVER_EXPORTED} or
* @param flags Additional options for the receiver. For apps targeting
* {@link android.os.Build.VERSION_CODES#TIRAMISU},
* either {@link #RECEIVER_EXPORTED} or
* {@link #RECEIVER_NOT_EXPORTED} must be specified if the receiver isn't being registered
* for protected broadcasts, and may additionally specify
* {@link #RECEIVER_VISIBLE_TO_INSTANT_APPS} if {@link #RECEIVER_EXPORTED} is
* specified.
* for
* <a href="https://developer.android.com/guide/components/broadcasts#system-broadcasts">system broadcasts</a> or an exception will be thrown. If
* {@link #RECEIVER_EXPORTED} is specified, a receiver may additionally
* specify {@link #RECEIVER_VISIBLE_TO_INSTANT_APPS}. For a complete list of
* system broadcast actions, see the BROADCAST_ACTIONS.TXT file in the
* Android SDK. If both {@link #RECEIVER_EXPORTED} and
* {@link #RECEIVER_NOT_EXPORTED} are specified, an exception will be thrown as
* well.
*
* @return The first sticky intent found that matches <var>filter</var>,
* or null if there are none.
@@ -3146,10 +3153,18 @@ public abstract class Context {
* no permission is required.
* @param scheduler Handler identifying the thread that will receive
* the Intent. If {@code null}, the main thread of the process will be used.
* @param flags Additional options for the receiver. As of
* Android T, either {@link #RECEIVER_EXPORTED} or
* {@link #RECEIVER_NOT_EXPORTED} must be specified if the receiver isn't being
* registered for protected broadcasts
* @param flags Additional options for the receiver. For apps targeting
* {@link android.os.Build.VERSION_CODES#TIRAMISU},
* either {@link #RECEIVER_EXPORTED} or
* {@link #RECEIVER_NOT_EXPORTED} must be specified if the receiver isn't being registered
* for
* <a href="https://developer.android.com/guide/components/broadcasts#system-broadcasts">system broadcasts</a> or an exception will be thrown. If
* {@link #RECEIVER_EXPORTED} is specified, a receiver may additionally
* specify {@link #RECEIVER_VISIBLE_TO_INSTANT_APPS}. For a complete list of
* system broadcast actions, see the BROADCAST_ACTIONS.TXT file in the
* Android SDK. If both {@link #RECEIVER_EXPORTED} and
* {@link #RECEIVER_NOT_EXPORTED} are specified, an exception will be thrown as
* well.
*
* @return The first sticky intent found that matches <var>filter</var>,
* or {@code null} if there are none.
@@ -3213,10 +3228,18 @@ public abstract class Context {
* no permission is required.
* @param scheduler Handler identifying the thread that will receive
* the Intent. If null, the main thread of the process will be used.
* @param flags Additional options for the receiver. As of
* Android T, either {@link #RECEIVER_EXPORTED} or
* {@link #RECEIVER_NOT_EXPORTED} must be specified if the receiver isn't being
* registered for protected broadcasts
* @param flags Additional options for the receiver. For apps targeting
* {@link android.os.Build.VERSION_CODES#TIRAMISU},
* either {@link #RECEIVER_EXPORTED} or
* {@link #RECEIVER_NOT_EXPORTED} must be specified if the receiver isn't being registered
* for
* <a href="https://developer.android.com/guide/components/broadcasts#system-broadcasts">system broadcasts</a> or an exception will be thrown. If
* {@link #RECEIVER_EXPORTED} is specified, a receiver may additionally
* specify {@link #RECEIVER_VISIBLE_TO_INSTANT_APPS}. For a complete list of
* system broadcast actions, see the BROADCAST_ACTIONS.TXT file in the
* Android SDK. If both {@link #RECEIVER_EXPORTED} and
* {@link #RECEIVER_NOT_EXPORTED} are specified, an exception will be thrown as
* well.
*
* @return The first sticky intent found that matches <var>filter</var>,
* or null if there are none.