Skip to content

Commit a36c074

Browse files
author
Robert Greenwalt
committed
Un-remove legacy ConnectivityManager API.
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
1 parent e827c25 commit a36c074

5 files changed

Lines changed: 7 additions & 19 deletions

File tree

api/current.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18147,8 +18147,11 @@ package android.net {
1814718147
method public boolean requestBandwidthUpdate(android.net.Network);
1814818148
method public void requestNetwork(android.net.NetworkRequest, android.net.ConnectivityManager.NetworkCallback);
1814918149
method public void requestNetwork(android.net.NetworkRequest, android.app.PendingIntent);
18150+
method public deprecated boolean requestRouteToHost(int, int);
1815018151
method public deprecated void setNetworkPreference(int);
1815118152
method public static deprecated boolean setProcessDefaultNetwork(android.net.Network);
18153+
method public deprecated int startUsingNetworkFeature(int, java.lang.String);
18154+
method public deprecated int stopUsingNetworkFeature(int, java.lang.String);
1815218155
method public void unregisterNetworkCallback(android.net.ConnectivityManager.NetworkCallback);
1815318156
method public void unregisterNetworkCallback(android.app.PendingIntent);
1815418157
field public static final deprecated java.lang.String ACTION_BACKGROUND_DATA_SETTING_CHANGED = "android.net.conn.BACKGROUND_DATA_SETTING_CHANGED";

api/removed.txt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,6 @@ package android.media {
3434

3535
package android.net {
3636

37-
public class ConnectivityManager {
38-
method public deprecated boolean requestRouteToHost(int, int);
39-
method public deprecated boolean requestRouteToHostAddress(int, java.net.InetAddress);
40-
method public deprecated int startUsingNetworkFeature(int, java.lang.String);
41-
method public deprecated int stopUsingNetworkFeature(int, java.lang.String);
42-
}
43-
4437
public class SSLCertificateSocketFactory extends javax.net.ssl.SSLSocketFactory {
4538
method public static deprecated org.apache.http.conn.ssl.SSLSocketFactory getHttpSocketFactory(int, android.net.SSLSessionCache);
4639
}

api/system-current.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19660,8 +19660,11 @@ package android.net {
1966019660
method public boolean requestBandwidthUpdate(android.net.Network);
1966119661
method public void requestNetwork(android.net.NetworkRequest, android.net.ConnectivityManager.NetworkCallback);
1966219662
method public void requestNetwork(android.net.NetworkRequest, android.app.PendingIntent);
19663+
method public deprecated boolean requestRouteToHost(int, int);
1966319664
method public deprecated void setNetworkPreference(int);
1966419665
method public static deprecated boolean setProcessDefaultNetwork(android.net.Network);
19666+
method public deprecated int startUsingNetworkFeature(int, java.lang.String);
19667+
method public deprecated int stopUsingNetworkFeature(int, java.lang.String);
1966519668
method public void unregisterNetworkCallback(android.net.ConnectivityManager.NetworkCallback);
1966619669
method public void unregisterNetworkCallback(android.app.PendingIntent);
1966719670
field public static final deprecated java.lang.String ACTION_BACKGROUND_DATA_SETTING_CHANGED = "android.net.conn.BACKGROUND_DATA_SETTING_CHANGED";

api/system-removed.txt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,6 @@ package android.media {
3434

3535
package android.net {
3636

37-
public class ConnectivityManager {
38-
method public deprecated boolean requestRouteToHost(int, int);
39-
method public deprecated boolean requestRouteToHostAddress(int, java.net.InetAddress);
40-
method public deprecated int startUsingNetworkFeature(int, java.lang.String);
41-
method public deprecated int stopUsingNetworkFeature(int, java.lang.String);
42-
}
43-
4437
public class SSLCertificateSocketFactory extends javax.net.ssl.SSLSocketFactory {
4538
method public static deprecated org.apache.http.conn.ssl.SSLSocketFactory getHttpSocketFactory(int, android.net.SSLSessionCache);
4639
}

core/java/android/net/ConnectivityManager.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -892,7 +892,6 @@ public NetworkCapabilities getNetworkCapabilities(Network network) {
892892
*
893893
* @deprecated Deprecated in favor of the cleaner
894894
* {@link #requestNetwork(NetworkRequest, NetworkCallback)} API.
895-
* @removed
896895
*/
897896
public int startUsingNetworkFeature(int networkType, String feature) {
898897
NetworkCapabilities netCap = networkCapabilitiesForFeature(networkType, feature);
@@ -939,8 +938,7 @@ public int startUsingNetworkFeature(int networkType, String feature) {
939938
* implementation+feature combination, except that the value {@code -1}
940939
* always indicates failure.
941940
*
942-
* @deprecated Deprecated in favor of the cleaner {@link unregisterNetworkCallback} API.
943-
* @removed
941+
* @deprecated Deprecated in favor of the cleaner {@link #unregisterNetworkCallback} API.
944942
*/
945943
public int stopUsingNetworkFeature(int networkType, String feature) {
946944
NetworkCapabilities netCap = networkCapabilitiesForFeature(networkType, feature);
@@ -1220,7 +1218,6 @@ private boolean removeRequestForFeature(NetworkCapabilities netCap) {
12201218
* @deprecated Deprecated in favor of the
12211219
* {@link #requestNetwork(NetworkRequest, NetworkCallback)},
12221220
* {@link #bindProcessToNetwork} and {@link Network#getSocketFactory} API.
1223-
* @removed
12241221
*/
12251222
public boolean requestRouteToHost(int networkType, int hostAddress) {
12261223
return requestRouteToHostAddress(networkType, NetworkUtils.intToInetAddress(hostAddress));
@@ -1239,7 +1236,6 @@ public boolean requestRouteToHost(int networkType, int hostAddress) {
12391236
* @hide
12401237
* @deprecated Deprecated in favor of the {@link #requestNetwork} and
12411238
* {@link #bindProcessToNetwork} API.
1242-
* @removed
12431239
*/
12441240
public boolean requestRouteToHostAddress(int networkType, InetAddress hostAddress) {
12451241
try {

0 commit comments

Comments
 (0)