Added or fixed doctrings for required permissions.
Bug: 6591338 Change-Id: Ia2092f9994854701b5fa1425c371817367ae07ec
This commit is contained in:
@@ -377,6 +377,8 @@ public class ConnectivityManager {
|
|||||||
* this network is the default route for outgoing connections. You should
|
* this network is the default route for outgoing connections. You should
|
||||||
* always check {@link NetworkInfo#isConnected()} before initiating network
|
* always check {@link NetworkInfo#isConnected()} before initiating network
|
||||||
* traffic. This may return {@code null} when no networks are available.
|
* traffic. This may return {@code null} when no networks are available.
|
||||||
|
* <p>This method requires the caller to hold the permission
|
||||||
|
* {@link android.Manifest.permission#ACCESS_NETWORK_STATE}.
|
||||||
*/
|
*/
|
||||||
public NetworkInfo getActiveNetworkInfo() {
|
public NetworkInfo getActiveNetworkInfo() {
|
||||||
try {
|
try {
|
||||||
@@ -451,6 +453,8 @@ public class ConnectivityManager {
|
|||||||
* Tells the underlying networking system that the caller wants to
|
* Tells the underlying networking system that the caller wants to
|
||||||
* begin using the named feature. The interpretation of {@code feature}
|
* begin using the named feature. The interpretation of {@code feature}
|
||||||
* is completely up to each networking implementation.
|
* is completely up to each networking implementation.
|
||||||
|
* <p>This method requires the caller to hold the permission
|
||||||
|
* {@link android.Manifest.permission#CHANGE_NETWORK_STATE}.
|
||||||
* @param networkType specifies which network the request pertains to
|
* @param networkType specifies which network the request pertains to
|
||||||
* @param feature the name of the feature to be used
|
* @param feature the name of the feature to be used
|
||||||
* @return an integer value representing the outcome of the request.
|
* @return an integer value representing the outcome of the request.
|
||||||
@@ -471,6 +475,8 @@ public class ConnectivityManager {
|
|||||||
* Tells the underlying networking system that the caller is finished
|
* Tells the underlying networking system that the caller is finished
|
||||||
* using the named feature. The interpretation of {@code feature}
|
* using the named feature. The interpretation of {@code feature}
|
||||||
* is completely up to each networking implementation.
|
* is completely up to each networking implementation.
|
||||||
|
* <p>This method requires the caller to hold the permission
|
||||||
|
* {@link android.Manifest.permission#CHANGE_NETWORK_STATE}.
|
||||||
* @param networkType specifies which network the request pertains to
|
* @param networkType specifies which network the request pertains to
|
||||||
* @param feature the name of the feature that is no longer needed
|
* @param feature the name of the feature that is no longer needed
|
||||||
* @return an integer value representing the outcome of the request.
|
* @return an integer value representing the outcome of the request.
|
||||||
@@ -490,6 +496,8 @@ public class ConnectivityManager {
|
|||||||
* Ensure that a network route exists to deliver traffic to the specified
|
* Ensure that a network route exists to deliver traffic to the specified
|
||||||
* host via the specified network interface. An attempt to add a route that
|
* host via the specified network interface. An attempt to add a route that
|
||||||
* already exists is ignored, but treated as successful.
|
* already exists is ignored, but treated as successful.
|
||||||
|
* <p>This method requires the caller to hold the permission
|
||||||
|
* {@link android.Manifest.permission#CHANGE_NETWORK_STATE}.
|
||||||
* @param networkType the type of the network over which traffic to the specified
|
* @param networkType the type of the network over which traffic to the specified
|
||||||
* host is to be routed
|
* host is to be routed
|
||||||
* @param hostAddress the IP address of the host to which the route is desired
|
* @param hostAddress the IP address of the host to which the route is desired
|
||||||
|
|||||||
Reference in New Issue
Block a user