diff options
author | Lorenzo Colitti <lorenzo@google.com> | 2015-04-24 12:23:24 +0900 |
---|---|---|
committer | Lorenzo Colitti <lorenzo@google.com> | 2015-05-01 12:36:28 +0900 |
commit | 0708693f1eac78901ca2e05e4d3c12efddc54c68 (patch) | |
tree | b1a413f1891a5a1aa5ce82464580e606286a0af3 | |
parent | 5793f22e68f74522dfe5780b96b22d18617467be (diff) | |
download | frameworks_base-0708693f1eac78901ca2e05e4d3c12efddc54c68.zip frameworks_base-0708693f1eac78901ca2e05e4d3c12efddc54c68.tar.gz frameworks_base-0708693f1eac78901ca2e05e4d3c12efddc54c68.tar.bz2 |
Document and unhide CALLBACK_PRECHECK.
Bug: 20038463
Change-Id: Ie79f2d28c06cf611289504e49c471b55ffb9890f
-rw-r--r-- | api/current.txt | 1 | ||||
-rw-r--r-- | api/system-current.txt | 1 | ||||
-rw-r--r-- | core/java/android/net/ConnectivityManager.java | 16 |
3 files changed, 14 insertions, 4 deletions
diff --git a/api/current.txt b/api/current.txt index 1ffa5aa..84c5f61 100644 --- a/api/current.txt +++ b/api/current.txt @@ -18373,6 +18373,7 @@ package android.net { method public void onLinkPropertiesChanged(android.net.Network, android.net.LinkProperties); method public void onLosing(android.net.Network, int); method public void onLost(android.net.Network); + method public void onPreCheck(android.net.Network); } public static abstract interface ConnectivityManager.OnNetworkActiveListener { diff --git a/api/system-current.txt b/api/system-current.txt index 15989b3..dd4df74 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -19841,6 +19841,7 @@ package android.net { method public void onLinkPropertiesChanged(android.net.Network, android.net.LinkProperties); method public void onLosing(android.net.Network, int); method public void onLost(android.net.Network); + method public void onPreCheck(android.net.Network); } public static abstract interface ConnectivityManager.OnNetworkActiveListener { diff --git a/core/java/android/net/ConnectivityManager.java b/core/java/android/net/ConnectivityManager.java index c531e7e..8c3fc081 100644 --- a/core/java/android/net/ConnectivityManager.java +++ b/core/java/android/net/ConnectivityManager.java @@ -2144,14 +2144,22 @@ public class ConnectivityManager { public static final int CANCELED = 8; /** - * @hide - * Called whenever the framework connects to a network that it may use to - * satisfy this request + * Called when the framework connects to a new network to evaluate whether it satisfies this + * request. If evaluation succeeds, this callback may be followed by an {@link #onAvailable} + * callback. There is no guarantee that this new network will satisfy any requests, or that + * the network will stay connected for longer than the time necessary to evaluate it. + * <p> + * Most applications <b>should not</b> act on this callback, and should instead use + * {@link #onAvailable}. This callback is intended for use by applications that can assist + * the framework in properly evaluating the network — for example, an application that + * can automatically log in to a captive portal without user intervention. + * + * @param network The {@link Network} of the network that is being evaluated. */ public void onPreCheck(Network network) {} /** - * Called when the framework connects and has declared new network ready for use. + * Called when the framework connects and has declared a new network ready for use. * This callback may be called more than once if the {@link Network} that is * satisfying the request changes. * |