OSDN Git Service

WifiManager: add iface name and mode labels
authorRebecca Silberstein <silberst@google.com>
Thu, 25 May 2017 08:53:08 +0000 (01:53 -0700)
committerRebecca Silberstein <silberst@google.com>
Thu, 25 May 2017 10:34:17 +0000 (03:34 -0700)
Connectivity service needs to get the interface name and intended ip
configuration mode for softap.
This CL adds the interface name and softap target mode variables to
use to insert the extra info into the wifi ap state change broadcast.

Note: additional CLs are needed to verify the iface name and mode.  The
mode tracking is still in progress.

Bug: 62076211
Test: frameworks/base/wifi/tests/runtests.sh
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: manually verified the name in the broadcast
Change-Id: I64e1d13a9e422945fe9c4c268c206da365d0a3eb

wifi/java/android/net/wifi/WifiManager.java

index 25d61af..cfc1fd2 100644 (file)
@@ -383,6 +383,21 @@ public class WifiManager {
     @SystemApi
     public static final String EXTRA_PREVIOUS_WIFI_AP_STATE = "previous_wifi_state";
     /**
+     * The interface used for the softap.
+     *
+     * @hide
+     */
+    public static final String EXTRA_WIFI_AP_INTERFACE_NAME = "wifi_ap_interface_name";
+    /**
+     * The intended ip mode for this softap.
+     * @see #IFACE_IP_MODE_TETHERED
+     * @see #IFACE_IP_MODE_LOCAL_ONLY
+     *
+     * @hide
+     */
+    public static final String EXTRA_WIFI_AP_MODE = "wifi_ap_mode";
+
+    /**
      * Wi-Fi AP is currently being disabled. The state will change to
      * {@link #WIFI_AP_STATE_DISABLED} if it finishes successfully.
      *