summaryrefslogtreecommitdiff
path: root/wifi/java/android/net/wifi/WifiInfo.java
diff options
context:
space:
mode:
Diffstat (limited to 'wifi/java/android/net/wifi/WifiInfo.java')
-rw-r--r--wifi/java/android/net/wifi/WifiInfo.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/wifi/java/android/net/wifi/WifiInfo.java b/wifi/java/android/net/wifi/WifiInfo.java
index 53883674e058..cc437a8e552a 100644
--- a/wifi/java/android/net/wifi/WifiInfo.java
+++ b/wifi/java/android/net/wifi/WifiInfo.java
@@ -22,6 +22,7 @@ import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.compat.annotation.UnsupportedAppUsage;
import android.net.NetworkInfo.DetailedState;
+import android.net.TransportInfo;
import android.os.Build;
import android.os.Parcel;
import android.os.Parcelable;
@@ -38,8 +39,17 @@ import java.util.Locale;
/**
* Describes the state of any Wi-Fi connection that is active or
* is in the process of being set up.
+ *
+ * In the connected state, access to location sensitive fields requires
+ * the same permissions as {@link WifiManager#getScanResults}. If such access is not allowed,
+ * {@link #getSSID} will return {@link WifiManager#UNKNOWN_SSID} and
+ * {@link #getBSSID} will return {@code "02:00:00:00:00:00"}.
+ * {@link #getNetworkId()} will return {@code -1}.
+ * {@link #getPasspointFqdn()} will return null.
+ * {@link #getPasspointProviderFriendlyName()} will return null.
*/
-public class WifiInfo implements Parcelable {
+public class WifiInfo implements TransportInfo, Parcelable {
+ // TODO(b/162602799): Implement equals/hahscode methods.
private static final String TAG = "WifiInfo";
/**
* This is the map described in the Javadoc comment above. The positions