diff options
| author | Your Name <jacobhobbie@google.com> | 2022-03-30 20:59:51 +0000 |
|---|---|---|
| committer | Your Name <jacobhobbie@google.com> | 2022-04-01 16:39:37 +0000 |
| commit | b4b352e37f5bdf3078b9201eca184338b2e84de3 (patch) | |
| tree | 0613e13b3d0fb21baad83a0d27a5fdb3077d0bf8 /core/java/android | |
| parent | 4ef511ba815fc7c189d29a45b65a6dc7a6618148 (diff) | |
Updating receiver flag requirements and enforcement.
Since we're no longer planning on enforcing the flag requirement for
exported/not exported in T, we should update the compat change so that
it's disabled, which will allow developers to still test it, change the
error message so it doesn't reference Android T, and remove the
additional system property that enabled stricter enforcement.
Test: atest ContextText
Bug: 225057637
Change-Id: Ibdc079ef7e92954422ddde715b3a4ae358f552e3
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/content/Context.java | 48 |
1 files changed, 20 insertions, 28 deletions
diff --git a/core/java/android/content/Context.java b/core/java/android/content/Context.java index 5dd68a9fcfc9..0d258ce6c0fc 100644 --- a/core/java/android/content/Context.java +++ b/core/java/android/content/Context.java @@ -3054,13 +3054,11 @@ 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. 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="{@docRoot}guide/components/broadcasts#system-broadcasts">system - * broadcasts</a> or an exception will be thrown. If - * {@link #RECEIVER_EXPORTED} is specified, a receiver may additionally + * @param flags Additional options for the receiver. In a future release, either + * {@link #RECEIVER_EXPORTED} or {@link #RECEIVER_NOT_EXPORTED} must be specified if the + * receiver isn't being registered for <a href="{@docRoot}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 @@ -3137,13 +3135,11 @@ 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. 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="{@docRoot}guide/components/broadcasts#system-broadcasts">system - * broadcasts</a> or an exception will be thrown. If - * {@link #RECEIVER_EXPORTED} is specified, a receiver may additionally + * @param flags Additional options for the receiver. In a future release, either + * {@link #RECEIVER_EXPORTED} or {@link #RECEIVER_NOT_EXPORTED} must be specified if the + * receiver isn't being registered for <a href="{@docRoot}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 @@ -3207,13 +3203,11 @@ 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. 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="{@docRoot}guide/components/broadcasts#system-broadcasts">system - * broadcasts</a> or an exception will be thrown. If - * {@link #RECEIVER_EXPORTED} is specified, a receiver may additionally + * @param flags Additional options for the receiver. In a future release, either + * {@link #RECEIVER_EXPORTED} or {@link #RECEIVER_NOT_EXPORTED} must be specified if the + * receiver isn't being registered for <a href="{@docRoot}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 @@ -3282,13 +3276,11 @@ 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. 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="{@docRoot}guide/components/broadcasts#system-broadcasts">system - * broadcasts</a> or an exception will be thrown. If - * {@link #RECEIVER_EXPORTED} is specified, a receiver may additionally + * @param flags Additional options for the receiver. In a future release, either + * {@link #RECEIVER_EXPORTED} or {@link #RECEIVER_NOT_EXPORTED} must be specified if the + * receiver isn't being registered for <a href="{@docRoot}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 |
