Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8a773a34 authored by Shai Barack's avatar Shai Barack
Browse files

Document UDC behavior change affecting registerReceiver

Though this is noted in other docs, devs are still regularly
surprised by this change.
Adding this to the javadoc for `Context#registerReceiver`
to boost the signal.

Change-Id: I0c4e96f9dd0b28f373de8e7bbb14016dd6442a39
parent e56cc199
Loading
Loading
Loading
Loading
+32 −0
Original line number Diff line number Diff line
@@ -3256,6 +3256,14 @@ public abstract class Context {
     *
     * <p>See {@link BroadcastReceiver} for more information on Intent broadcasts.
     *
     * <p>As of {@link android.os.Build.VERSION_CODES#UPSIDE_DOWN_CAKE}, the system can <a
     * href="{@docRoot}develop/background-work/background-tasks/broadcasts#android-14">place
     * context-registered broadcasts in a queue while the app is in the <a
     * href="{@docRoot}guide/components/activities/process-lifecycle">cached state</a>.
     * When the app leaves the cached state, such as returning to the
     * foreground, the system delivers any queued broadcasts. Multiple instances
     * of certain broadcasts might be merged into one broadcast.
     *
     * <p>As of {@link android.os.Build.VERSION_CODES#ICE_CREAM_SANDWICH}, receivers
     * registered with this method will correctly respect the
     * {@link Intent#setPackage(String)} specified for an Intent being broadcast.
@@ -3301,6 +3309,14 @@ public abstract class Context {
     *
     * <p>See {@link BroadcastReceiver} for more information on Intent broadcasts.
     *
     * <p>As of {@link android.os.Build.VERSION_CODES#UPSIDE_DOWN_CAKE}, the system can <a
     * href="{@docRoot}develop/background-work/background-tasks/broadcasts#android-14">place
     * context-registered broadcasts in a queue while the app is in the <a
     * href="{@docRoot}guide/components/activities/process-lifecycle">cached state</a>.
     * When the app leaves the cached state, such as returning to the
     * foreground, the system delivers any queued broadcasts. Multiple instances
     * of certain broadcasts might be merged into one broadcast.
     *
     * <p>As of {@link android.os.Build.VERSION_CODES#ICE_CREAM_SANDWICH}, receivers
     * registered with this method will correctly respect the
     * {@link Intent#setPackage(String)} specified for an Intent being broadcast.
@@ -3342,6 +3358,14 @@ public abstract class Context {
     *
     * <p>See {@link BroadcastReceiver} for more information on Intent broadcasts.
     *
     * <p>As of {@link android.os.Build.VERSION_CODES#UPSIDE_DOWN_CAKE}, the system can <a
     * href="{@docRoot}develop/background-work/background-tasks/broadcasts#android-14">place
     * context-registered broadcasts in a queue while the app is in the <a
     * href="{@docRoot}guide/components/activities/process-lifecycle">cached state</a>.
     * When the app leaves the cached state, such as returning to the
     * foreground, the system delivers any queued broadcasts. Multiple instances
     * of certain broadcasts might be merged into one broadcast.
     *
     * <p>As of {@link android.os.Build.VERSION_CODES#ICE_CREAM_SANDWICH}, receivers
     * registered with this method will correctly respect the
     * {@link Intent#setPackage(String)} specified for an Intent being broadcast.
@@ -3385,6 +3409,14 @@ public abstract class Context {
     *
     * <p>See {@link BroadcastReceiver} for more information on Intent broadcasts.
     *
     * <p>As of {@link android.os.Build.VERSION_CODES#UPSIDE_DOWN_CAKE}, the system can <a
     * href="{@docRoot}develop/background-work/background-tasks/broadcasts#android-14">place
     * context-registered broadcasts in a queue while the app is in the <a
     * href="{@docRoot}guide/components/activities/process-lifecycle">cached state</a>.
     * When the app leaves the cached state, such as returning to the
     * foreground, the system delivers any queued broadcasts. Multiple instances
     * of certain broadcasts might be merged into one broadcast.
     *
     * <p>As of {@link android.os.Build.VERSION_CODES#ICE_CREAM_SANDWICH}, receivers
     * registered with this method will correctly respect the
     * {@link Intent#setPackage(String)} specified for an Intent being broadcast.