Merge "Marking deprecated recommendation request code as @removed." into oc-dev
diff --git a/api/removed.txt b/api/removed.txt
index b0dad45..756dc69 100644
--- a/api/removed.txt
+++ b/api/removed.txt
@@ -238,6 +238,18 @@
     method public deprecated int stopUsingNetworkFeature(int, java.lang.String);
   }
 
+  public abstract class NetworkRecommendationProvider {
+    ctor public deprecated NetworkRecommendationProvider(android.os.Handler);
+    method public deprecated void onRequestRecommendation(android.net.RecommendationRequest, android.net.NetworkRecommendationProvider.ResultCallback);
+    field public static final deprecated java.lang.String EXTRA_RECOMMENDATION_RESULT = "android.net.extra.RECOMMENDATION_RESULT";
+    field public static final deprecated java.lang.String EXTRA_SEQUENCE = "android.net.extra.SEQUENCE";
+  }
+
+  public static deprecated class NetworkRecommendationProvider.ResultCallback {
+    ctor public NetworkRecommendationProvider.ResultCallback(android.os.IRemoteCallback, int);
+    method public void onResult(android.net.RecommendationResult);
+  }
+
   public abstract class PskKeyManager {
     ctor public PskKeyManager();
     field public static final int MAX_IDENTITY_HINT_LENGTH_BYTES = 128; // 0x80
@@ -245,6 +257,37 @@
     field public static final int MAX_KEY_LENGTH_BYTES = 256; // 0x100
   }
 
+  public final deprecated class RecommendationRequest implements android.os.Parcelable {
+    ctor protected RecommendationRequest(android.os.Parcel);
+    method public android.net.wifi.WifiConfiguration[] getConnectableConfigs();
+    method public android.net.wifi.WifiConfiguration getConnectedConfig();
+    method public android.net.wifi.WifiConfiguration getDefaultWifiConfig();
+    method public int getLastSelectedNetworkId();
+    method public long getLastSelectedNetworkTimestamp();
+    method public android.net.wifi.ScanResult[] getScanResults();
+    method public void setConnectableConfigs(android.net.wifi.WifiConfiguration[]);
+    method public void setConnectedConfig(android.net.wifi.WifiConfiguration);
+    field public static final android.os.Parcelable.Creator<android.net.RecommendationRequest> CREATOR;
+  }
+
+  public static final deprecated class RecommendationRequest.Builder {
+    ctor public RecommendationRequest.Builder();
+    method public android.net.RecommendationRequest build();
+    method public android.net.RecommendationRequest.Builder setConnectableConfigs(android.net.wifi.WifiConfiguration[]);
+    method public android.net.RecommendationRequest.Builder setConnectedWifiConfig(android.net.wifi.WifiConfiguration);
+    method public android.net.RecommendationRequest.Builder setDefaultWifiConfig(android.net.wifi.WifiConfiguration);
+    method public android.net.RecommendationRequest.Builder setLastSelectedNetwork(int, long);
+    method public android.net.RecommendationRequest.Builder setScanResults(android.net.wifi.ScanResult[]);
+  }
+
+  public final deprecated class RecommendationResult implements android.os.Parcelable {
+    method public static android.net.RecommendationResult createConnectRecommendation(android.net.wifi.WifiConfiguration);
+    method public static android.net.RecommendationResult createDoNotConnectRecommendation();
+    method public android.net.wifi.WifiConfiguration getWifiConfiguration();
+    method public boolean hasRecommendation();
+    field public static final android.os.Parcelable.Creator<android.net.RecommendationResult> CREATOR;
+  }
+
   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 9e234d0..f94ea7e 100644
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -27861,17 +27861,9 @@
   }
 
   public abstract class NetworkRecommendationProvider {
-    ctor public deprecated NetworkRecommendationProvider(android.os.Handler);
     ctor public NetworkRecommendationProvider(android.content.Context, java.util.concurrent.Executor);
     method public final android.os.IBinder getBinder();
-    method public deprecated void onRequestRecommendation(android.net.RecommendationRequest, android.net.NetworkRecommendationProvider.ResultCallback);
     method public abstract void onRequestScores(android.net.NetworkKey[]);
-    field public static final deprecated java.lang.String EXTRA_RECOMMENDATION_RESULT = "android.net.extra.RECOMMENDATION_RESULT";
-    field public static final deprecated java.lang.String EXTRA_SEQUENCE = "android.net.extra.SEQUENCE";
-  }
-
-  public static deprecated class NetworkRecommendationProvider.ResultCallback {
-    method public void onResult(android.net.RecommendationResult);
   }
 
   public class NetworkRequest implements android.os.Parcelable {
@@ -27937,41 +27929,6 @@
     field public static final android.os.Parcelable.Creator<android.net.ProxyInfo> CREATOR;
   }
 
-  public final deprecated class RecommendationRequest implements android.os.Parcelable {
-    ctor protected RecommendationRequest(android.os.Parcel);
-    method public int describeContents();
-    method public android.net.wifi.WifiConfiguration[] getConnectableConfigs();
-    method public android.net.wifi.WifiConfiguration getConnectedConfig();
-    method public android.net.wifi.WifiConfiguration getDefaultWifiConfig();
-    method public int getLastSelectedNetworkId();
-    method public long getLastSelectedNetworkTimestamp();
-    method public android.net.wifi.ScanResult[] getScanResults();
-    method public void setConnectableConfigs(android.net.wifi.WifiConfiguration[]);
-    method public void setConnectedConfig(android.net.wifi.WifiConfiguration);
-    method public void writeToParcel(android.os.Parcel, int);
-    field public static final android.os.Parcelable.Creator<android.net.RecommendationRequest> CREATOR;
-  }
-
-  public static final deprecated class RecommendationRequest.Builder {
-    ctor public RecommendationRequest.Builder();
-    method public android.net.RecommendationRequest build();
-    method public android.net.RecommendationRequest.Builder setConnectableConfigs(android.net.wifi.WifiConfiguration[]);
-    method public android.net.RecommendationRequest.Builder setConnectedWifiConfig(android.net.wifi.WifiConfiguration);
-    method public android.net.RecommendationRequest.Builder setDefaultWifiConfig(android.net.wifi.WifiConfiguration);
-    method public android.net.RecommendationRequest.Builder setLastSelectedNetwork(int, long);
-    method public android.net.RecommendationRequest.Builder setScanResults(android.net.wifi.ScanResult[]);
-  }
-
-  public final deprecated class RecommendationResult implements android.os.Parcelable {
-    method public static android.net.RecommendationResult createConnectRecommendation(android.net.wifi.WifiConfiguration);
-    method public static android.net.RecommendationResult createDoNotConnectRecommendation();
-    method public int describeContents();
-    method public android.net.wifi.WifiConfiguration getWifiConfiguration();
-    method public boolean hasRecommendation();
-    method public void writeToParcel(android.os.Parcel, int);
-    field public static final android.os.Parcelable.Creator<android.net.RecommendationResult> CREATOR;
-  }
-
   public final class RouteInfo implements android.os.Parcelable {
     method public int describeContents();
     method public android.net.IpPrefix getDestination();
diff --git a/api/system-removed.txt b/api/system-removed.txt
index 2fd3039..1df6a37 100644
--- a/api/system-removed.txt
+++ b/api/system-removed.txt
@@ -236,6 +236,18 @@
     method public deprecated int stopUsingNetworkFeature(int, java.lang.String);
   }
 
+  public abstract class NetworkRecommendationProvider {
+    ctor public deprecated NetworkRecommendationProvider(android.os.Handler);
+    method public deprecated void onRequestRecommendation(android.net.RecommendationRequest, android.net.NetworkRecommendationProvider.ResultCallback);
+    field public static final deprecated java.lang.String EXTRA_RECOMMENDATION_RESULT = "android.net.extra.RECOMMENDATION_RESULT";
+    field public static final deprecated java.lang.String EXTRA_SEQUENCE = "android.net.extra.SEQUENCE";
+  }
+
+  public static deprecated class NetworkRecommendationProvider.ResultCallback {
+    ctor public NetworkRecommendationProvider.ResultCallback(android.os.IRemoteCallback, int);
+    method public void onResult(android.net.RecommendationResult);
+  }
+
   public abstract class PskKeyManager {
     ctor public PskKeyManager();
     field public static final int MAX_IDENTITY_HINT_LENGTH_BYTES = 128; // 0x80
@@ -243,6 +255,37 @@
     field public static final int MAX_KEY_LENGTH_BYTES = 256; // 0x100
   }
 
+  public final deprecated class RecommendationRequest implements android.os.Parcelable {
+    ctor protected RecommendationRequest(android.os.Parcel);
+    method public android.net.wifi.WifiConfiguration[] getConnectableConfigs();
+    method public android.net.wifi.WifiConfiguration getConnectedConfig();
+    method public android.net.wifi.WifiConfiguration getDefaultWifiConfig();
+    method public int getLastSelectedNetworkId();
+    method public long getLastSelectedNetworkTimestamp();
+    method public android.net.wifi.ScanResult[] getScanResults();
+    method public void setConnectableConfigs(android.net.wifi.WifiConfiguration[]);
+    method public void setConnectedConfig(android.net.wifi.WifiConfiguration);
+    field public static final android.os.Parcelable.Creator<android.net.RecommendationRequest> CREATOR;
+  }
+
+  public static final deprecated class RecommendationRequest.Builder {
+    ctor public RecommendationRequest.Builder();
+    method public android.net.RecommendationRequest build();
+    method public android.net.RecommendationRequest.Builder setConnectableConfigs(android.net.wifi.WifiConfiguration[]);
+    method public android.net.RecommendationRequest.Builder setConnectedWifiConfig(android.net.wifi.WifiConfiguration);
+    method public android.net.RecommendationRequest.Builder setDefaultWifiConfig(android.net.wifi.WifiConfiguration);
+    method public android.net.RecommendationRequest.Builder setLastSelectedNetwork(int, long);
+    method public android.net.RecommendationRequest.Builder setScanResults(android.net.wifi.ScanResult[]);
+  }
+
+  public final deprecated class RecommendationResult implements android.os.Parcelable {
+    method public static android.net.RecommendationResult createConnectRecommendation(android.net.wifi.WifiConfiguration);
+    method public static android.net.RecommendationResult createDoNotConnectRecommendation();
+    method public android.net.wifi.WifiConfiguration getWifiConfiguration();
+    method public boolean hasRecommendation();
+    field public static final android.os.Parcelable.Creator<android.net.RecommendationResult> CREATOR;
+  }
+
   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/test-removed.txt b/api/test-removed.txt
index b0dad45..756dc69 100644
--- a/api/test-removed.txt
+++ b/api/test-removed.txt
@@ -238,6 +238,18 @@
     method public deprecated int stopUsingNetworkFeature(int, java.lang.String);
   }
 
+  public abstract class NetworkRecommendationProvider {
+    ctor public deprecated NetworkRecommendationProvider(android.os.Handler);
+    method public deprecated void onRequestRecommendation(android.net.RecommendationRequest, android.net.NetworkRecommendationProvider.ResultCallback);
+    field public static final deprecated java.lang.String EXTRA_RECOMMENDATION_RESULT = "android.net.extra.RECOMMENDATION_RESULT";
+    field public static final deprecated java.lang.String EXTRA_SEQUENCE = "android.net.extra.SEQUENCE";
+  }
+
+  public static deprecated class NetworkRecommendationProvider.ResultCallback {
+    ctor public NetworkRecommendationProvider.ResultCallback(android.os.IRemoteCallback, int);
+    method public void onResult(android.net.RecommendationResult);
+  }
+
   public abstract class PskKeyManager {
     ctor public PskKeyManager();
     field public static final int MAX_IDENTITY_HINT_LENGTH_BYTES = 128; // 0x80
@@ -245,6 +257,37 @@
     field public static final int MAX_KEY_LENGTH_BYTES = 256; // 0x100
   }
 
+  public final deprecated class RecommendationRequest implements android.os.Parcelable {
+    ctor protected RecommendationRequest(android.os.Parcel);
+    method public android.net.wifi.WifiConfiguration[] getConnectableConfigs();
+    method public android.net.wifi.WifiConfiguration getConnectedConfig();
+    method public android.net.wifi.WifiConfiguration getDefaultWifiConfig();
+    method public int getLastSelectedNetworkId();
+    method public long getLastSelectedNetworkTimestamp();
+    method public android.net.wifi.ScanResult[] getScanResults();
+    method public void setConnectableConfigs(android.net.wifi.WifiConfiguration[]);
+    method public void setConnectedConfig(android.net.wifi.WifiConfiguration);
+    field public static final android.os.Parcelable.Creator<android.net.RecommendationRequest> CREATOR;
+  }
+
+  public static final deprecated class RecommendationRequest.Builder {
+    ctor public RecommendationRequest.Builder();
+    method public android.net.RecommendationRequest build();
+    method public android.net.RecommendationRequest.Builder setConnectableConfigs(android.net.wifi.WifiConfiguration[]);
+    method public android.net.RecommendationRequest.Builder setConnectedWifiConfig(android.net.wifi.WifiConfiguration);
+    method public android.net.RecommendationRequest.Builder setDefaultWifiConfig(android.net.wifi.WifiConfiguration);
+    method public android.net.RecommendationRequest.Builder setLastSelectedNetwork(int, long);
+    method public android.net.RecommendationRequest.Builder setScanResults(android.net.wifi.ScanResult[]);
+  }
+
+  public final deprecated class RecommendationResult implements android.os.Parcelable {
+    method public static android.net.RecommendationResult createConnectRecommendation(android.net.wifi.WifiConfiguration);
+    method public static android.net.RecommendationResult createDoNotConnectRecommendation();
+    method public android.net.wifi.WifiConfiguration getWifiConfiguration();
+    method public boolean hasRecommendation();
+    field public static final android.os.Parcelable.Creator<android.net.RecommendationResult> CREATOR;
+  }
+
   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/NetworkRecommendationProvider.java b/core/java/android/net/NetworkRecommendationProvider.java
index 1eaa1f9..a6d132e 100644
--- a/core/java/android/net/NetworkRecommendationProvider.java
+++ b/core/java/android/net/NetworkRecommendationProvider.java
@@ -41,11 +41,13 @@
     private static final boolean VERBOSE = Build.IS_DEBUGGABLE && Log.isLoggable(TAG, Log.VERBOSE);
     /** The key into the callback Bundle where the RecommendationResult will be found.
      * @deprecated to be removed.
+     * @removed
      */
     public static final String EXTRA_RECOMMENDATION_RESULT =
             "android.net.extra.RECOMMENDATION_RESULT";
     /** The key into the callback Bundle where the sequence will be found.
      * @deprecated to be removed.
+     * @removed
      */
     public static final String EXTRA_SEQUENCE = "android.net.extra.SEQUENCE";
     private final IBinder mService;
@@ -54,6 +56,7 @@
      * Constructs a new instance.
      * @param handler indicates which thread to use when handling requests. Cannot be {@code null}.
      * @deprecated use {@link #NetworkRecommendationProvider(Context, Executor)}
+     * @removed
      */
     public NetworkRecommendationProvider(Handler handler) {
         if (handler == null) {
@@ -82,6 +85,7 @@
      *                 available it must be passed into
      *                 {@link ResultCallback#onResult(RecommendationResult)}.
      * @deprecated to be removed.
+     * @removed
      */
     public void onRequestRecommendation(RecommendationRequest request, ResultCallback callback) {}
 
@@ -107,6 +111,7 @@
      * is available.
      *
      * @deprecated to be removed.
+     * @removed
      */
     public static class ResultCallback {
         private final IRemoteCallback mCallback;
diff --git a/core/java/android/net/RecommendationRequest.java b/core/java/android/net/RecommendationRequest.java
index 45ee3a5..21641d9 100644
--- a/core/java/android/net/RecommendationRequest.java
+++ b/core/java/android/net/RecommendationRequest.java
@@ -17,7 +17,6 @@
 package android.net;
 
 
-import android.annotation.SystemApi;
 import android.net.wifi.ScanResult;
 import android.net.wifi.WifiConfiguration;
 import android.os.Parcel;
@@ -31,8 +30,8 @@
  * @see {@link NetworkScoreManager#requestRecommendation(RecommendationRequest)}.
  * @hide
  * @deprecated to be removed.
+ * @removed
  */
-@SystemApi
 public final class RecommendationRequest implements Parcelable {
     private final ScanResult[] mScanResults;
     private final WifiConfiguration mDefaultConfig;
@@ -45,8 +44,8 @@
      * Builder class for constructing {@link RecommendationRequest} instances.
      * @hide
      * @deprecated to be removed.
+     * @removed
      */
-    @SystemApi
     public static final class Builder {
         private ScanResult[] mScanResults;
         private WifiConfiguration mDefaultConfig;
diff --git a/core/java/android/net/RecommendationResult.java b/core/java/android/net/RecommendationResult.java
index ce4d83a..d66dd22 100644
--- a/core/java/android/net/RecommendationResult.java
+++ b/core/java/android/net/RecommendationResult.java
@@ -18,12 +18,10 @@
 
 import android.annotation.NonNull;
 import android.annotation.Nullable;
-import android.annotation.SystemApi;
 import android.net.wifi.WifiConfiguration;
 import android.os.Parcel;
 import android.os.Parcelable;
 
-import com.android.internal.annotations.VisibleForTesting;
 import com.android.internal.util.Preconditions;
 
 /**
@@ -32,8 +30,8 @@
  * @see {@link NetworkScoreManager#requestRecommendation(RecommendationRequest)}.
  * @hide
  * @deprecated to be removed.
+ * @removed
  */
-@SystemApi
 public final class RecommendationResult implements Parcelable {
     private final WifiConfiguration mWifiConfiguration;