summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author TreeHugger Robot <treehugger-gerrit@google.com> 2021-11-11 21:56:04 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2021-11-11 21:56:04 +0000
commitf28a7250eced71e09af94c8d364a16e52d16f3ad (patch)
treec3d5371adf3c7615456f00f9d051ae23f236842b
parent0f6c8e2cc33ba373818cdd19217d3668e278814b (diff)
parent0b039a029fe460f3591ae32acfbea6f8e1f7208c (diff)
Merge "Updating documentation for registerReceiver."
-rw-r--r--core/java/android/content/Context.java15
1 files changed, 10 insertions, 5 deletions
diff --git a/core/java/android/content/Context.java b/core/java/android/content/Context.java
index 665f626030bb..e6df79ed2695 100644
--- a/core/java/android/content/Context.java
+++ b/core/java/android/content/Context.java
@@ -3000,12 +3000,17 @@ public abstract class Context {
*
* @param receiver The BroadcastReceiver to handle the broadcast.
* @param filter Selects the Intent broadcasts to be received.
- * @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 protected broadcasts 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
+ * 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.