Merge "Expose APIs to get supported algorithms"
diff --git a/api/current.txt b/api/current.txt
index ce64d38..9673b33 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -55,6 +55,8 @@
 package android.net.ipsec.ike {
 
   public final class ChildSaProposal extends android.net.ipsec.ike.SaProposal {
+    method @NonNull public static java.util.Set<java.lang.Integer> getSupportedEncryptionAlgorithms();
+    method @NonNull public static java.util.Set<java.lang.Integer> getSupportedIntegrityAlgorithms();
   }
 
   public static final class ChildSaProposal.Builder {
@@ -126,6 +128,9 @@
 
   public final class IkeSaProposal extends android.net.ipsec.ike.SaProposal {
     method @NonNull public java.util.List<java.lang.Integer> getPseudorandomFunctions();
+    method @NonNull public static java.util.Set<java.lang.Integer> getSupportedEncryptionAlgorithms();
+    method @NonNull public static java.util.Set<java.lang.Integer> getSupportedIntegrityAlgorithms();
+    method @NonNull public static java.util.Set<java.lang.Integer> getSupportedPseudorandomFunctions();
   }
 
   public static final class IkeSaProposal.Builder {
@@ -257,6 +262,7 @@
     method @NonNull public java.util.List<java.lang.Integer> getDhGroups();
     method @NonNull public java.util.List<android.util.Pair<java.lang.Integer,java.lang.Integer>> getEncryptionAlgorithms();
     method @NonNull public java.util.List<java.lang.Integer> getIntegrityAlgorithms();
+    method @NonNull public static java.util.Set<java.lang.Integer> getSupportedDhGroups();
     field public static final int DH_GROUP_1024_BIT_MODP = 2; // 0x2
     field public static final int DH_GROUP_1536_BIT_MODP = 5; // 0x5
     field public static final int DH_GROUP_2048_BIT_MODP = 14; // 0xe
diff --git a/src/java/android/net/ipsec/ike/ChildSaProposal.java b/src/java/android/net/ipsec/ike/ChildSaProposal.java
index 084aee9..5645c2b 100644
--- a/src/java/android/net/ipsec/ike/ChildSaProposal.java
+++ b/src/java/android/net/ipsec/ike/ChildSaProposal.java
@@ -166,10 +166,7 @@
     /**
      * Returns supported encryption algorithms for Child SA proposal negotiation.
      *
-     * <p>Some algorithms may not be supported on old devices. Callers MUST check if an algorithm is
-     * supported before using it.
-     *
-     * @hide
+     * <p>Some algorithms may not be supported on old devices.
      */
     @NonNull
     public static Set<Integer> getSupportedEncryptionAlgorithms() {
@@ -191,10 +188,7 @@
     /**
      * Returns supported integrity algorithms for Child SA proposal negotiation.
      *
-     * <p>Some algorithms may not be supported on old devices. Callers MUST check if an algorithm is
-     * supported before using it.
-     *
-     * @hide
+     * <p>Some algorithms may not be supported on old devices.
      */
     @NonNull
     public static Set<Integer> getSupportedIntegrityAlgorithms() {
diff --git a/src/java/android/net/ipsec/ike/IkeSaProposal.java b/src/java/android/net/ipsec/ike/IkeSaProposal.java
index 6042317..ad2bbe1 100644
--- a/src/java/android/net/ipsec/ike/IkeSaProposal.java
+++ b/src/java/android/net/ipsec/ike/IkeSaProposal.java
@@ -131,31 +131,19 @@
         return result;
     }
 
-    /**
-     * Returns supported encryption algorithms for IKE SA proposal negotiation.
-     *
-     * @hide
-     */
+    /** Returns supported encryption algorithms for IKE SA proposal negotiation. */
     @NonNull
     public static Set<Integer> getSupportedEncryptionAlgorithms() {
         return getKeySet(SUPPORTED_ENCRYPTION_ALGO_TO_STR);
     }
 
-    /**
-     * Returns supported integrity algorithms for IKE SA proposal negotiation.
-     *
-     * @hide
-     */
+    /** Returns supported integrity algorithms for IKE SA proposal negotiation. */
     @NonNull
     public static Set<Integer> getSupportedIntegrityAlgorithms() {
         return getKeySet(SUPPORTED_INTEGRITY_ALGO_TO_STR);
     }
 
-    /**
-     * Returns supported pseudorandom functions for IKE SA proposal negotiation.
-     *
-     * @hide
-     */
+    /** Returns supported pseudorandom functions for IKE SA proposal negotiation. */
     @NonNull
     public static Set<Integer> getSupportedPseudorandomFunctions() {
         return getKeySet(SUPPORTED_PRF_TO_STR);
diff --git a/src/java/android/net/ipsec/ike/SaProposal.java b/src/java/android/net/ipsec/ike/SaProposal.java
index 11227e1..fd60a3d 100644
--- a/src/java/android/net/ipsec/ike/SaProposal.java
+++ b/src/java/android/net/ipsec/ike/SaProposal.java
@@ -613,11 +613,7 @@
         return result;
     }
 
-    /**
-     * Returns supported DH groups for IKE and Child SA proposal negotiation.
-     *
-     * @hide
-     */
+    /** Returns supported DH groups for IKE and Child SA proposal negotiation. */
     @NonNull
     public static Set<Integer> getSupportedDhGroups() {
         return getKeySet(SUPPORTED_DH_GROUP_TO_STR);