From 3e422ac3cce07a0002b2752ca55da196881902ed Mon Sep 17 00:00:00 2001 From: Mark Lu Date: Mon, 5 Dec 2016 10:57:55 -0800 Subject: [PATCH] docs: changes to broadcast documentation - move BroadcastReceiver info to developer guide. see cl/140402421 - add usage note to CONNECTIVITY_ACTION broadcast bug:32533262 bug:33106411 Change-Id: Ic2aa517831d29418e0c42aa6fc1e7f9aeb50f802 --- core/java/android/net/ConnectivityManager.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/java/android/net/ConnectivityManager.java b/core/java/android/net/ConnectivityManager.java index 0afb546aa4..f3c78171e0 100644 --- a/core/java/android/net/ConnectivityManager.java +++ b/core/java/android/net/ConnectivityManager.java @@ -87,6 +87,13 @@ public class ConnectivityManager { * sent as an extra; it should be consulted to see what kind of * connectivity event occurred. *

+ * Apps targeting Android 7.0 (API level 24) and higher do not receive this + * broadcast if they declare the broadcast receiver in their manifest. Apps + * will still receive broadcasts if they register their + * {@link android.content.BroadcastReceiver} with + * {@link android.content.Context#registerReceiver Context.registerReceiver()} + * and that context is still valid. + *

* If this is a connection that was the result of failing over from a * disconnected network, then the FAILOVER_CONNECTION boolean extra is * set to true.