diff options
| author | Paul Jensen <pauljensen@google.com> | 2015-07-01 14:31:19 +0000 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-07-01 14:31:21 +0000 |
| commit | e51c46b0683114d0aa9010a45ec0443505a0b389 (patch) | |
| tree | 7a6ca68f3547a8f011c3d146514c87b5fcd66e51 /core/java/android | |
| parent | cb23ec418eb0dacee7ef9f2866b94eccd2b2ba90 (diff) | |
| parent | f2c1cfe4c5dec5041dfee00bd2dd1e3e1ecc0aea (diff) | |
Merge "Add ConnectivityManager.unregisterNetworkCallback(PendingIntent) API" into mnc-dev
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/net/ConnectivityManager.java | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/core/java/android/net/ConnectivityManager.java b/core/java/android/net/ConnectivityManager.java index 80476ea6d844..12cd5f172191 100644 --- a/core/java/android/net/ConnectivityManager.java +++ b/core/java/android/net/ConnectivityManager.java @@ -2565,7 +2565,7 @@ public class ConnectivityManager { * replaced by this one, effectively releasing the previous {@link NetworkRequest}. * <p> * The request may be released normally by calling - * {@link #releaseNetworkRequest(android.app.PendingIntent)}. + * {@link #unregisterNetworkCallback(android.app.PendingIntent)}. * <p>This method requires the caller to hold the permission * {@link android.Manifest.permission#ACCESS_NETWORK_STATE}. * @param request {@link NetworkRequest} describing this request. @@ -2619,6 +2619,19 @@ public class ConnectivityManager { } /** + * Unregisters a callback previously registered via + * {@link #registerNetworkCallback(NetworkRequest, android.app.PendingIntent)}. + * + * @param operation A PendingIntent equal (as defined by {@link Intent#filterEquals}) to the + * PendingIntent passed to + * {@link #registerNetworkCallback(NetworkRequest, android.app.PendingIntent)}. + * Cannot be null. + */ + public void unregisterNetworkCallback(PendingIntent operation) { + releaseNetworkRequest(operation); + } + + /** * Informs the system whether it should switch to {@code network} regardless of whether it is * validated or not. If {@code accept} is true, and the network was explicitly selected by the * user (e.g., by selecting a Wi-Fi network in the Settings app), then the network will become |
