OSDN Git Service

Update hidden WifiManager API.
authorAmin Shaikh <ashaikh@google.com>
Fri, 24 Mar 2017 00:59:48 +0000 (17:59 -0700)
committerAmin Shaikh <ashaikh@google.com>
Fri, 24 Mar 2017 01:50:01 +0000 (18:50 -0700)
- Refactor getWpsNfcConfigurationToken(int) to getCurrentNetworkWpsNfcConfigurationToken()

Bug: 35725168
Test: runtest frameworks-wifi
Change-Id: Ia362e4d781297d7f89a4437a0c5ae6edecff24e5

wifi/java/android/net/wifi/IWifiManager.aidl
wifi/java/android/net/wifi/WifiManager.java

index af48d0a..10ffd8a 100644 (file)
@@ -139,7 +139,7 @@ interface IWifiManager
 
     void enableTdlsWithMacAddress(String remoteMacAddress, boolean enable);
 
-    String getWpsNfcConfigurationToken(int netId);
+    String getCurrentNetworkWpsNfcConfigurationToken();
 
     void enableVerboseLogging(int verbose);
 
index 824c436..ae6a679 100644 (file)
@@ -1437,15 +1437,15 @@ public class WifiManager {
     }
 
     /**
-     * Creates a configuration token describing the network referenced by {@code netId}
-     * of MIME type application/vnd.wfa.wsc. Can be used to configure WiFi networks via NFC.
+     * Creates a configuration token describing the current network of MIME type
+     * application/vnd.wfa.wsc. Can be used to configure WiFi networks via NFC.
      *
-     * @return hex-string encoded configuration token
+     * @return hex-string encoded configuration token or null if there is no current network
      * @hide
      */
-    public String getWpsNfcConfigurationToken(int netId) {
+    public String getCurrentNetworkWpsNfcConfigurationToken() {
         try {
-            return mService.getWpsNfcConfigurationToken(netId);
+            return mService.getCurrentNetworkWpsNfcConfigurationToken();
         } catch (RemoteException e) {
             throw e.rethrowFromSystemServer();
         }