diff options
-rw-r--r-- | wifi/java/android/net/wifi/IWifiManager.aidl | 2 | ||||
-rw-r--r-- | wifi/java/android/net/wifi/WifiManager.java | 15 |
2 files changed, 17 insertions, 0 deletions
diff --git a/wifi/java/android/net/wifi/IWifiManager.aidl b/wifi/java/android/net/wifi/IWifiManager.aidl index 84e933d..0535fe0 100644 --- a/wifi/java/android/net/wifi/IWifiManager.aidl +++ b/wifi/java/android/net/wifi/IWifiManager.aidl @@ -128,5 +128,7 @@ interface IWifiManager boolean isBatchedScanSupported(); void pollBatchedScan(); + + String getWpsNfcConfigurationToken(int netId); } diff --git a/wifi/java/android/net/wifi/WifiManager.java b/wifi/java/android/net/wifi/WifiManager.java index 0862b7e..5af1e4e 100644 --- a/wifi/java/android/net/wifi/WifiManager.java +++ b/wifi/java/android/net/wifi/WifiManager.java @@ -930,6 +930,21 @@ 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. + * + * @return hex-string encoded configuration token + * @hide + */ + public String getWpsNfcConfigurationToken(int netId) { + try { + return mService.getWpsNfcConfigurationToken(netId); + } catch (RemoteException e) { + return null; + } + } + + /** * Return dynamic information about the current Wi-Fi connection, if any is active. * @return the Wi-Fi information, contained in {@link WifiInfo}. */ |