am 5973eb48: am bf816248: am e51c46b0: Merge "Add ConnectivityManager.unregisterNetworkCallback(PendingIntent) API" into mnc-dev

* commit '5973eb48220e1e44a4a3192cd9740fe8b47f8a3a':
  Add ConnectivityManager.unregisterNetworkCallback(PendingIntent) API
This commit is contained in:
Paul Jensen
2015-07-03 05:35:58 +00:00
committed by Android Git Automerger

View File

@@ -2565,7 +2565,7 @@ public class ConnectivityManager {
* replaced by this one, effectively releasing the previous {@link NetworkRequest}. * replaced by this one, effectively releasing the previous {@link NetworkRequest}.
* <p> * <p>
* The request may be released normally by calling * 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 * <p>This method requires the caller to hold the permission
* {@link android.Manifest.permission#ACCESS_NETWORK_STATE}. * {@link android.Manifest.permission#ACCESS_NETWORK_STATE}.
* @param request {@link NetworkRequest} describing this request. * @param request {@link NetworkRequest} describing this request.
@@ -2618,6 +2618,19 @@ public class ConnectivityManager {
} catch (RemoteException e) {} } catch (RemoteException e) {}
} }
/**
* 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 * 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 * validated or not. If {@code accept} is true, and the network was explicitly selected by the