Skip to content

Commit

Permalink
Un-remove legacy ConnectivityManager API.
Browse files Browse the repository at this point in the history
These were @removed too soon.  We need to keep them @deprecated until
the bulk of devices support the new API and then we can remove them.

bug:22728205
Change-Id: If1b46ff1878f1778517624112b195c461645ddd1
  • Loading branch information
Robert Greenwalt committed Jul 28, 2015
1 parent e827c25 commit a36c074
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 19 deletions.
3 changes: 3 additions & 0 deletions api/current.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18147,8 +18147,11 @@ package android.net {
method public boolean requestBandwidthUpdate(android.net.Network);
method public void requestNetwork(android.net.NetworkRequest, android.net.ConnectivityManager.NetworkCallback);
method public void requestNetwork(android.net.NetworkRequest, android.app.PendingIntent);
method public deprecated boolean requestRouteToHost(int, int);
method public deprecated void setNetworkPreference(int);
method public static deprecated boolean setProcessDefaultNetwork(android.net.Network);
method public deprecated int startUsingNetworkFeature(int, java.lang.String);
method public deprecated int stopUsingNetworkFeature(int, java.lang.String);
method public void unregisterNetworkCallback(android.net.ConnectivityManager.NetworkCallback);
method public void unregisterNetworkCallback(android.app.PendingIntent);
field public static final deprecated java.lang.String ACTION_BACKGROUND_DATA_SETTING_CHANGED = "android.net.conn.BACKGROUND_DATA_SETTING_CHANGED";
Expand Down
7 changes: 0 additions & 7 deletions api/removed.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,6 @@ package android.media {

package android.net {

public class ConnectivityManager {
method public deprecated boolean requestRouteToHost(int, int);
method public deprecated boolean requestRouteToHostAddress(int, java.net.InetAddress);
method public deprecated int startUsingNetworkFeature(int, java.lang.String);
method public deprecated int stopUsingNetworkFeature(int, java.lang.String);
}

public class SSLCertificateSocketFactory extends javax.net.ssl.SSLSocketFactory {
method public static deprecated org.apache.http.conn.ssl.SSLSocketFactory getHttpSocketFactory(int, android.net.SSLSessionCache);
}
Expand Down
3 changes: 3 additions & 0 deletions api/system-current.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19660,8 +19660,11 @@ package android.net {
method public boolean requestBandwidthUpdate(android.net.Network);
method public void requestNetwork(android.net.NetworkRequest, android.net.ConnectivityManager.NetworkCallback);
method public void requestNetwork(android.net.NetworkRequest, android.app.PendingIntent);
method public deprecated boolean requestRouteToHost(int, int);
method public deprecated void setNetworkPreference(int);
method public static deprecated boolean setProcessDefaultNetwork(android.net.Network);
method public deprecated int startUsingNetworkFeature(int, java.lang.String);
method public deprecated int stopUsingNetworkFeature(int, java.lang.String);
method public void unregisterNetworkCallback(android.net.ConnectivityManager.NetworkCallback);
method public void unregisterNetworkCallback(android.app.PendingIntent);
field public static final deprecated java.lang.String ACTION_BACKGROUND_DATA_SETTING_CHANGED = "android.net.conn.BACKGROUND_DATA_SETTING_CHANGED";
Expand Down
7 changes: 0 additions & 7 deletions api/system-removed.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,6 @@ package android.media {

package android.net {

public class ConnectivityManager {
method public deprecated boolean requestRouteToHost(int, int);
method public deprecated boolean requestRouteToHostAddress(int, java.net.InetAddress);
method public deprecated int startUsingNetworkFeature(int, java.lang.String);
method public deprecated int stopUsingNetworkFeature(int, java.lang.String);
}

public class SSLCertificateSocketFactory extends javax.net.ssl.SSLSocketFactory {
method public static deprecated org.apache.http.conn.ssl.SSLSocketFactory getHttpSocketFactory(int, android.net.SSLSessionCache);
}
Expand Down
6 changes: 1 addition & 5 deletions core/java/android/net/ConnectivityManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -892,7 +892,6 @@ public NetworkCapabilities getNetworkCapabilities(Network network) {
*
* @deprecated Deprecated in favor of the cleaner
* {@link #requestNetwork(NetworkRequest, NetworkCallback)} API.
* @removed
*/
public int startUsingNetworkFeature(int networkType, String feature) {
NetworkCapabilities netCap = networkCapabilitiesForFeature(networkType, feature);
Expand Down Expand Up @@ -939,8 +938,7 @@ public int startUsingNetworkFeature(int networkType, String feature) {
* implementation+feature combination, except that the value {@code -1}
* always indicates failure.
*
* @deprecated Deprecated in favor of the cleaner {@link unregisterNetworkCallback} API.
* @removed
* @deprecated Deprecated in favor of the cleaner {@link #unregisterNetworkCallback} API.
*/
public int stopUsingNetworkFeature(int networkType, String feature) {
NetworkCapabilities netCap = networkCapabilitiesForFeature(networkType, feature);
Expand Down Expand Up @@ -1220,7 +1218,6 @@ private boolean removeRequestForFeature(NetworkCapabilities netCap) {
* @deprecated Deprecated in favor of the
* {@link #requestNetwork(NetworkRequest, NetworkCallback)},
* {@link #bindProcessToNetwork} and {@link Network#getSocketFactory} API.
* @removed
*/
public boolean requestRouteToHost(int networkType, int hostAddress) {
return requestRouteToHostAddress(networkType, NetworkUtils.intToInetAddress(hostAddress));
Expand All @@ -1239,7 +1236,6 @@ public boolean requestRouteToHost(int networkType, int hostAddress) {
* @hide
* @deprecated Deprecated in favor of the {@link #requestNetwork} and
* {@link #bindProcessToNetwork} API.
* @removed
*/
public boolean requestRouteToHostAddress(int networkType, InetAddress hostAddress) {
try {
Expand Down

0 comments on commit a36c074

Please sign in to comment.