Deprecate ConnectivityManager.isNetworkTypeValid as it's unneeded.

All ConnectivityManager APIs taking a network type have been
deprecated so there should be no need to validate a network type.

bug:20647016
Change-Id: I2dcf24f58016e94aa814dda38cfc848366cc461c
This commit is contained in:
Paul Jensen
2015-05-06 10:42:25 -04:00
parent 96011f4e3a
commit bbb61094b2

View File

@@ -496,6 +496,8 @@ public class ConnectivityManager {
* Tests if a given integer represents a valid network type. * Tests if a given integer represents a valid network type.
* @param networkType the type to be tested * @param networkType the type to be tested
* @return a boolean. {@code true} if the type is valid, else {@code false} * @return a boolean. {@code true} if the type is valid, else {@code false}
* @deprecated All APIs accepting a network type are deprecated. There should be no need to
* validate a network type.
*/ */
public static boolean isNetworkTypeValid(int networkType) { public static boolean isNetworkTypeValid(int networkType) {
return networkType >= 0 && networkType <= MAX_NETWORK_TYPE; return networkType >= 0 && networkType <= MAX_NETWORK_TYPE;