From 1cef853e2d57da0431433d5f89e49458a209f77f Mon Sep 17 00:00:00 2001 From: David Su Date: Tue, 22 Oct 2019 13:50:05 -0700 Subject: [PATCH] Clarify JavaDoc for SoftAP APIs Add more documentation to WifiManager's EXTRA_WIFI_AP_INTERFACE_NAME, EXTRA_WIFI_AP_MODE, and startSoftAp(). Bug: 143138160 Test: compiles Change-Id: I15a22ca8d0718e02e606ba6e19d20b1727aa93d2 Merged-In: I15a22ca8d0718e02e606ba6e19d20b1727aa93d2 --- wifi/java/android/net/wifi/WifiManager.java | 24 ++++++++++++--------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/wifi/java/android/net/wifi/WifiManager.java b/wifi/java/android/net/wifi/WifiManager.java index 89000869b07d0..0d2e8166994ca 100644 --- a/wifi/java/android/net/wifi/WifiManager.java +++ b/wifi/java/android/net/wifi/WifiManager.java @@ -533,7 +533,9 @@ public class WifiManager { @SystemApi public static final String EXTRA_PREVIOUS_WIFI_AP_STATE = "previous_wifi_state"; /** - * The interface used for the softap. + * The lookup key for a String extra that stores the interface name used for the Soft AP. + * This extra is included in the broadcast {@link #WIFI_AP_STATE_CHANGED_ACTION}. + * Retrieve its value with {@link android.content.Intent#getStringExtra(String)}. * * @hide */ @@ -541,9 +543,10 @@ public class WifiManager { public static final String EXTRA_WIFI_AP_INTERFACE_NAME = "android.net.wifi.extra.WIFI_AP_INTERFACE_NAME"; /** - * The intended ip mode for this softap. - * @see #IFACE_IP_MODE_TETHERED - * @see #IFACE_IP_MODE_LOCAL_ONLY + * The lookup key for an int extra that stores the intended IP mode for this Soft AP. + * One of {@link #IFACE_IP_MODE_TETHERED} or {@link #IFACE_IP_MODE_LOCAL_ONLY}. + * This extra is included in the broadcast {@link #WIFI_AP_STATE_CHANGED_ACTION}. + * Retrieve its value with {@link android.content.Intent#getIntExtra(String, int)}. * * @hide */ @@ -2578,12 +2581,13 @@ public class WifiManager { } /** - * Start SoftAp mode with the specified configuration. - * Note that starting in access point mode disables station - * mode operation - * @param wifiConfig SSID, security and channel details as - * part of WifiConfiguration - * @return {@code true} if the operation succeeds, {@code false} otherwise + * Start Soft AP (hotspot) mode with the specified configuration. + * Note that starting Soft AP mode may disable station mode operation if the device does not + * support concurrency. + * @param wifiConfig SSID, security and channel details as part of WifiConfiguration, or null to + * use the persisted Soft AP configuration that was previously set using + * {@link #setWifiApConfiguration(WifiConfiguration)}. + * @return {@code true} if the operation succeeded, {@code false} otherwise * * @hide */