summaryrefslogtreecommitdiffstats
path: root/wifi
diff options
context:
space:
mode:
authorAndres Morales <anmorales@google.com>2014-01-16 15:17:02 -0800
committerAndres Morales <anmorales@google.com>2014-01-31 22:16:34 +0000
commitb2e6bfd0f0fc675b253ce081d97ca192422a7495 (patch)
treee550cf19366127e6f41f34ea3cb01f98dae5d0f5 /wifi
parentc8577b384a0e0e04eed6d05660e013b5db47b7f2 (diff)
downloadframeworks_base-b2e6bfd0f0fc675b253ce081d97ca192422a7495.zip
frameworks_base-b2e6bfd0f0fc675b253ce081d97ca192422a7495.tar.gz
frameworks_base-b2e6bfd0f0fc675b253ce081d97ca192422a7495.tar.bz2
Add calls for NFC WSC token creation
Expose interface for generating Wifi Simple Configuration tokens from supplicant. Change-Id: Ie310a32f529c0330340e045aee561dc434aeee3e
Diffstat (limited to 'wifi')
-rw-r--r--wifi/java/android/net/wifi/IWifiManager.aidl2
-rw-r--r--wifi/java/android/net/wifi/WifiManager.java15
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 4a6b1ff..0b67c97 100644
--- a/wifi/java/android/net/wifi/IWifiManager.aidl
+++ b/wifi/java/android/net/wifi/IWifiManager.aidl
@@ -124,5 +124,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 aabe007..42cbaae 100644
--- a/wifi/java/android/net/wifi/WifiManager.java
+++ b/wifi/java/android/net/wifi/WifiManager.java
@@ -878,6 +878,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}.
*/