Merge "Update MOBIKE API documentation."
diff --git a/src/java/android/net/ipsec/ike/IkeSession.java b/src/java/android/net/ipsec/ike/IkeSession.java
index 2c4e404..cab99cc 100644
--- a/src/java/android/net/ipsec/ike/IkeSession.java
+++ b/src/java/android/net/ipsec/ike/IkeSession.java
@@ -266,15 +266,16 @@
}
/**
- * Update the IkeSession's Network to use the specified Network.
+ * Update the IkeSession's underlying Network to use the specified Network.
*
* <p>Updating the IkeSession's Network also updates the Network for any Child Sessions created
* with this IkeSession.
*
* <p>Once IkeSession has been updated to use the specified Network, the caller will be notified
- * via {@link IkeSessionCallback#onIkeSessionConnectionInfoChanged}. The caller will also be
- * notified for each migrated Child Session via {@link
- * ChildSessionCallback#onIpsecTransformMigrated}.
+ * via {@link IkeSessionCallback#onIkeSessionConnectionInfoChanged(IkeSessionConnectionInfo)}.
+ * The caller will also be notified for each migrated Child Session via {@link
+ * ChildSessionCallback#onIpSecTransformsMigrated(android.net.IpSecTransform,
+ * android.net.IpSecTransform)}.
*
* <p>In order for Network migration to be possible, the following must be true:
*
diff --git a/src/java/android/net/ipsec/ike/IkeSessionCallback.java b/src/java/android/net/ipsec/ike/IkeSessionCallback.java
index ef51ff0..21fac18 100644
--- a/src/java/android/net/ipsec/ike/IkeSessionCallback.java
+++ b/src/java/android/net/ipsec/ike/IkeSessionCallback.java
@@ -103,7 +103,7 @@
*
* <ul>
* <li>The underlying Network changing, or
- * <li>The local address disappearing from the current underlying (and unchanged) Network, or
+ * <li>The local address disappearing from the current (and unchanged) underlying Network, or
* <li>The remote address changing.
* </ul>
*
diff --git a/src/java/android/net/ipsec/ike/IkeSessionParams.java b/src/java/android/net/ipsec/ike/IkeSessionParams.java
index 7dea30c..698d379 100644
--- a/src/java/android/net/ipsec/ike/IkeSessionParams.java
+++ b/src/java/android/net/ipsec/ike/IkeSessionParams.java
@@ -117,17 +117,39 @@
/**
* If set, the IKE library will attempt to enable MOBIKE for the resulting IKE Session.
*
+ * <p>MOBIKE support is compatible with two Network modes:
+ *
+ * <ul>
+ * <li><b>Caller managed:</b> The caller controls the underlying Network for the IKE Session
+ * at all times. The IKE Session will only change underlying Networks if the caller
+ * initiates it through {@link IkeSession#setNetwork(Network)}. If the caller-specified
+ * Network dies, they will be notified via {@link
+ * IkeSessionCallback#onError(android.net.ipsec.ike.exceptions.IkeException)} with an
+ * {@link android.net.ipsec.ike.exceptions.IkeNetworkDiedException} specifying the Network
+ * that died.
+ * <li><b>Platform Default:</b> The IKE Session will always track the Platform default
+ * Network. The IKE Session will start on the Platform default Network, and any subsequent
+ * changes to the default Network (after the IKE_AUTH exchange completes) will cause the
+ * IKE Session's underlying Network to change. If the default Network dies with no
+ * replacements, the caller will be notified via {@link
+ * IkeSessionCallback#onError(android.net.ipsec.ike.exceptions.IkeException)} with an
+ * {@link android.net.ipsec.ike.exceptions.IkeNetworkDiedException}. The caller can either
+ * wait until for a new default Network to become available or they may close the Session
+ * manually via {@link IkeSession#close()}. Note that the IKE Session's maximum
+ * retransmissions may expire while waiting for a new default Network, in which case the
+ * Session will automatically close
+ * </ul>
+ *
* <p>Use of MOBIKE in the IKE Session requires the peer to also support MOBIKE.
*
* <p>If this option is set for an IKE Session, Transport-mode SAs will not be allowed in that
* Session.
*
* <p>Checking for MOBIKE use in an IKE Session is done via {@link
- * IkeSessionConfiguration#isIkeExtensionEnabled}.
+ * IkeSessionConfiguration#isIkeExtensionEnabled(int)}.
*
* @hide
*/
- // TODO(b/170770939): update javadoc scoping to SDK S+
public static final int IKE_OPTION_MOBIKE = 2;
private static final int MIN_IKE_OPTION = IKE_OPTION_ACCEPT_ANY_REMOTE_ID;