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

Commit e42dd31b authored by Michael Plass's avatar Michael Plass
Browse files

Document WifiManager.getConnectionInfo permission

BSSID/SSID can be used to deduce location, so require the same
location permissions for access to these WifiInfo fields
requested using WifiManager.getConnectionInfo() as for
WifiManager.getScanResults().

Bug: 36770596
Test: make offline-sdk-docs
Change-Id: I1dd6d1871f13d669a9504c23ba3b11d769c142f9
parent cdb4d758
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -345,7 +345,8 @@ public class WifiInfo implements Parcelable {
     * Returns the service set identifier (SSID) of the current 802.11 network.
     * If the SSID can be decoded as UTF-8, it will be returned surrounded by double
     * quotation marks. Otherwise, it is returned as a string of hex digits. The
     * SSID may be <unknown ssid> if there is no network currently connected.
     * SSID may be <unknown ssid> if there is no network currently connected,
     * or if the caller has insufficient permissions to access the SSID.
     * @return the SSID
     */
    public String getSSID() {
+8 −2
Original line number Diff line number Diff line
@@ -1633,6 +1633,12 @@ public class WifiManager {

    /**
     * Return dynamic information about the current Wi-Fi connection, if any is active.
     * <p>
     * In the connected state, access to the SSID and BSSID requires
     * the same permissions as {@link #getScanResults}. If such access is not allowed,
     * {@link WifiInfo#getSSID} will return {@code "<unknown ssid>"} and
     * {@link WifiInfo#getBSSID} will return {@code "02:00:00:00:00:00"}.
     *
     * @return the Wi-Fi information, contained in {@link WifiInfo}.
     */
    public WifiInfo getConnectionInfo() {
@@ -2330,7 +2336,7 @@ public class WifiManager {
        /** WPS start succeeded */
        public abstract void onStarted(String pin);

        /** WPS operation completed succesfully */
        /** WPS operation completed successfully */
        public abstract void onSucceeded();

        /**
@@ -3213,7 +3219,7 @@ public class WifiManager {
     * Normally the Wifi stack filters out packets not explicitly
     * addressed to this device.  Acquring a MulticastLock will
     * cause the stack to receive packets addressed to multicast
     * addresses.  Processing these extra packets can cause a noticable
     * addresses.  Processing these extra packets can cause a noticeable
     * battery drain and should be disabled when not needed.
     */
    public class MulticastLock {