OSDN Git Service

Expose WifiManager.setTdlsEnabled public API
authorVinit Deshapnde <vinitd@google.com>
Sat, 17 Aug 2013 00:16:45 +0000 (17:16 -0700)
committerVinit Deshapnde <vinitd@google.com>
Sat, 17 Aug 2013 00:16:45 +0000 (17:16 -0700)
Bug: 10221775

Change-Id: I559e4a2afd525a03c8a13fd151eca4638426d03e

api/current.txt
wifi/java/android/net/wifi/WifiManager.java

index 002b8d7..eb403be 100644 (file)
@@ -14474,6 +14474,8 @@ package android.net.wifi {
     method public boolean reconnect();
     method public boolean removeNetwork(int);
     method public boolean saveConfiguration();
+    method public void setTdlsEnabled(java.net.InetAddress, boolean);
+    method public void setTdlsEnabledWithMacAddress(java.lang.String, boolean);
     method public boolean setWifiEnabled(boolean);
     method public boolean startScan();
     method public int updateNetwork(android.net.wifi.WifiConfiguration);
index 6793710..b56cd53 100644 (file)
@@ -1146,16 +1146,26 @@ public class WifiManager {
 
 
     /**
-     * Enable TDLS on a specific local route
+     * Enable/Disable TDLS on a specific local route.
      *
-     * This API is used by WiFi display, but eventually it can be made public,
-     * just depends on how popular TDLS gets
+     * <p>
+     * TDLS enables two wireless endpoints to talk to each other directly
+     * without going through the access point that is managing the local
+     * network. It saves bandwidth and improves quality of the link.
+     * </p>
+     * <p>
+     * This API enables/disables the option of using TDLS. If enabled, the
+     * underlying hardware is free to use TDLS or a hop through the access
+     * point. If disabled, existing TDLS session is torn down and
+     * hardware is restricted to use access point for transferring wireless
+     * packets. Default value for all routes is 'disabled', meaning restricted
+     * to use access point for transferring packets.
+     * </p>
      *
      * @param remoteIPAddress IP address of the endpoint to setup TDLS with
      * @param enable true = setup and false = tear down TDLS
-     * @hide
      */
-    public void enableTdls(InetAddress remoteIPAddress, boolean enable) {
+    public void setTdlsEnabled(InetAddress remoteIPAddress, boolean enable) {
         try {
             mService.enableTdls(remoteIPAddress.getHostAddress(), enable);
         } catch (RemoteException e) {
@@ -1164,16 +1174,12 @@ public class WifiManager {
     }
 
     /**
-     * Enable TDLS on a specific local route
-     *
-     * This API is used by WiFi display, but eventually it can be made public,
-     * just depends on how popular TDLS gets
-     *
+     * Similar to {@link #setTdlsEnabled(InetAddress, boolean) }, except
+     * this version allows you to specify remote endpoint with a MAC address.
      * @param remoteMacAddress MAC address of the remote endpoint such as 00:00:0c:9f:f2:ab
      * @param enable true = setup and false = tear down TDLS
-     * @hide
      */
-    public void enableTdlsWithMacAddress(String remoteMacAddress, boolean enable) {
+    public void setTdlsEnabledWithMacAddress(String remoteMacAddress, boolean enable) {
         try {
             mService.enableTdlsWithMacAddress(remoteMacAddress, enable);
         } catch (RemoteException e) {