@removed requestRouteToHost and {start,stop}UsingNetworkFeature

Bug: 20482461
Change-Id: Ic59fc1271e664d85102dc7945c0c2ea82c0d6f6b
diff --git a/api/current.txt b/api/current.txt
index 1d2d96b..4c93195 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -18202,11 +18202,8 @@
     method public void reportNetworkConnectivity(android.net.Network, boolean);
     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);
     field public static final deprecated java.lang.String ACTION_BACKGROUND_DATA_SETTING_CHANGED = "android.net.conn.BACKGROUND_DATA_SETTING_CHANGED";
     field public static final java.lang.String CONNECTIVITY_ACTION = "android.net.conn.CONNECTIVITY_CHANGE";
@@ -18225,9 +18222,9 @@
     field public static final int TYPE_ETHERNET = 9; // 0x9
     field public static final int TYPE_MOBILE = 0; // 0x0
     field public static final int TYPE_MOBILE_DUN = 4; // 0x4
-    field public static final int TYPE_MOBILE_HIPRI = 5; // 0x5
-    field public static final int TYPE_MOBILE_MMS = 2; // 0x2
-    field public static final int TYPE_MOBILE_SUPL = 3; // 0x3
+    field public static final deprecated int TYPE_MOBILE_HIPRI = 5; // 0x5
+    field public static final deprecated int TYPE_MOBILE_MMS = 2; // 0x2
+    field public static final deprecated int TYPE_MOBILE_SUPL = 3; // 0x3
     field public static final int TYPE_VPN = 17; // 0x11
     field public static final int TYPE_WIFI = 1; // 0x1
     field public static final int TYPE_WIMAX = 6; // 0x6
diff --git a/api/removed.txt b/api/removed.txt
index 326b05d..a722e17 100644
--- a/api/removed.txt
+++ b/api/removed.txt
@@ -35,6 +35,13 @@
 
 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);
   }
diff --git a/api/system-current.txt b/api/system-current.txt
index 17e438c..05e7d2a 100644
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -19660,11 +19660,8 @@
     method public void reportNetworkConnectivity(android.net.Network, boolean);
     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);
     field public static final deprecated java.lang.String ACTION_BACKGROUND_DATA_SETTING_CHANGED = "android.net.conn.BACKGROUND_DATA_SETTING_CHANGED";
     field public static final java.lang.String CONNECTIVITY_ACTION = "android.net.conn.CONNECTIVITY_CHANGE";
@@ -19683,9 +19680,9 @@
     field public static final int TYPE_ETHERNET = 9; // 0x9
     field public static final int TYPE_MOBILE = 0; // 0x0
     field public static final int TYPE_MOBILE_DUN = 4; // 0x4
-    field public static final int TYPE_MOBILE_HIPRI = 5; // 0x5
-    field public static final int TYPE_MOBILE_MMS = 2; // 0x2
-    field public static final int TYPE_MOBILE_SUPL = 3; // 0x3
+    field public static final deprecated int TYPE_MOBILE_HIPRI = 5; // 0x5
+    field public static final deprecated int TYPE_MOBILE_MMS = 2; // 0x2
+    field public static final deprecated int TYPE_MOBILE_SUPL = 3; // 0x3
     field public static final int TYPE_VPN = 17; // 0x11
     field public static final int TYPE_WIFI = 1; // 0x1
     field public static final int TYPE_WIMAX = 6; // 0x6
diff --git a/api/system-removed.txt b/api/system-removed.txt
index 326b05d..a722e17 100644
--- a/api/system-removed.txt
+++ b/api/system-removed.txt
@@ -35,6 +35,13 @@
 
 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);
   }
diff --git a/core/java/android/net/ConnectivityManager.java b/core/java/android/net/ConnectivityManager.java
index a48b324..63f48cf 100644
--- a/core/java/android/net/ConnectivityManager.java
+++ b/core/java/android/net/ConnectivityManager.java
@@ -305,6 +305,9 @@
      * same network interface as {@link #TYPE_MOBILE} or it may use a different
      * one.  This is used by applications needing to talk to the carrier's
      * Multimedia Messaging Service servers.
+     *
+     * @deprecated Applications should instead use {@link #requestNetwork} to request a network that
+     *         provides the {@link NetworkCapabilities#NET_CAPABILITY_MMS} capability.
      */
     public static final int TYPE_MOBILE_MMS  = 2;
     /**
@@ -312,6 +315,9 @@
      * same network interface as {@link #TYPE_MOBILE} or it may use a different
      * one.  This is used by applications needing to talk to the carrier's
      * Secure User Plane Location servers for help locating the device.
+     *
+     * @deprecated Applications should instead use {@link #requestNetwork} to request a network that
+     *         provides the {@link NetworkCapabilities#NET_CAPABILITY_SUPL} capability.
      */
     public static final int TYPE_MOBILE_SUPL = 3;
     /**
@@ -324,9 +330,10 @@
     /**
      * A High Priority Mobile data connection.  This network type uses the
      * same network interface as {@link #TYPE_MOBILE} but the routing setup
-     * is different.  Only requesting processes will have access to the
-     * Mobile DNS servers and only IP's explicitly requested via {@link #requestRouteToHost}
-     * will route over this interface if no default route exists.
+     * is different.
+     *
+     * @deprecated Applications should instead use {@link #requestNetwork} to request a network that
+     *         uses the {@link NetworkCapabilities#TRANSPORT_CELLULAR} transport.
      */
     public static final int TYPE_MOBILE_HIPRI = 5;
     /**
@@ -386,7 +393,7 @@
      */
     public static final int TYPE_MOBILE_IA = 14;
 
-/**
+    /**
      * Emergency PDN connection for emergency calls
      * {@hide}
      */
@@ -736,7 +743,7 @@
     }
 
     /**
-     * Returns an array of of {@link NetworkCapabilities} objects, representing
+     * Returns an array of {@link android.net.NetworkCapabilities} objects, representing
      * the Networks that applications run by the given user will use by default.
      * @hide
      */
@@ -826,11 +833,11 @@
     }
 
     /**
-     * Get the {@link NetworkCapabilities} for the given {@link Network}.  This
+     * Get the {@link android.net.NetworkCapabilities} for the given {@link Network}.  This
      * will return {@code null} if the network is unknown.
      *
      * @param network The {@link Network} object identifying the network in question.
-     * @return The {@link NetworkCapabilities} for the network, or {@code null}.
+     * @return The {@link android.net.NetworkCapabilities} for the network, or {@code null}.
      */
     public NetworkCapabilities getNetworkCapabilities(Network network) {
         try {
@@ -854,6 +861,7 @@
      * always indicates failure.
      *
      * @deprecated Deprecated in favor of the cleaner {@link #requestNetwork} api.
+     * @removed
      */
     public int startUsingNetworkFeature(int networkType, String feature) {
         NetworkCapabilities netCap = networkCapabilitiesForFeature(networkType, feature);
@@ -901,6 +909,7 @@
      * always indicates failure.
      *
      * @deprecated Deprecated in favor of the cleaner {@link #requestNetwork} api.
+     * @removed
      */
     public int stopUsingNetworkFeature(int networkType, String feature) {
         NetworkCapabilities netCap = networkCapabilitiesForFeature(networkType, feature);
@@ -1179,6 +1188,7 @@
      *
      * @deprecated Deprecated in favor of the {@link #requestNetwork},
      *             {@link #bindProcessToNetwork} and {@link Network#getSocketFactory} api.
+     * @removed
      */
     public boolean requestRouteToHost(int networkType, int hostAddress) {
         return requestRouteToHostAddress(networkType, NetworkUtils.intToInetAddress(hostAddress));
@@ -1197,6 +1207,7 @@
      * @hide
      * @deprecated Deprecated in favor of the {@link #requestNetwork} and
      *             {@link #bindProcessToNetwork} api.
+     * @removed
      */
     public boolean requestRouteToHostAddress(int networkType, InetAddress hostAddress) {
         try {
@@ -2057,7 +2068,7 @@
          * changes capabilities but still satisfies the stated need.
          *
          * @param network The {@link Network} whose capabilities have changed.
-         * @param networkCapabilities The new {@link NetworkCapabilities} for this network.
+         * @param networkCapabilities The new {@link android.net.NetworkCapabilities} for this network.
          */
         public void onCapabilitiesChanged(Network network,
                 NetworkCapabilities networkCapabilities) {}
@@ -2299,7 +2310,7 @@
     }
 
     /**
-     * Request a network to satisfy a set of {@link NetworkCapabilities}.
+     * Request a network to satisfy a set of {@link android.net.NetworkCapabilities}.
      *
      * This {@link NetworkRequest} will live until released via
      * {@link #unregisterNetworkCallback} or the calling application exits.
@@ -2318,7 +2329,7 @@
     }
 
     /**
-     * Request a network to satisfy a set of {@link NetworkCapabilities}, limited
+     * Request a network to satisfy a set of {@link android.net.NetworkCapabilities}, limited
      * by a timeout.
      *
      * This function behaves identically to the non-timedout version, but if a suitable
@@ -2365,7 +2376,7 @@
 
 
     /**
-     * Request a network to satisfy a set of {@link NetworkCapabilities}.
+     * Request a network to satisfy a set of {@link android.net.NetworkCapabilities}.
      *
      * This function behaves identically to the version that takes a NetworkCallback, but instead
      * of {@link NetworkCallback} a {@link PendingIntent} is used.  This means