Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b2e6bfd0 authored by Andres Morales's avatar Andres Morales
Browse files

Add calls for NFC WSC token creation

Expose interface for generating Wifi Simple
Configuration tokens from supplicant.

Change-Id: Ie310a32f529c0330340e045aee561dc434aeee3e
parent c8577b38
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -124,5 +124,7 @@ interface IWifiManager
    boolean isBatchedScanSupported();

    void pollBatchedScan();

    String getWpsNfcConfigurationToken(int netId);
}
+15 −0
Original line number Diff line number Diff line
@@ -877,6 +877,21 @@ public class WifiManager {
        } catch (RemoteException e) { }
    }

    /**
     * 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}.