From 0084b657557fdeb5165afd78ebac6fc1eacb27b4 Mon Sep 17 00:00:00 2001 From: Quang Luong Date: Tue, 23 Feb 2021 09:14:42 -0800 Subject: [WifiTrackerLib] Add wifi standard to WifiEntry.ConnectedInfo Add wifi standard field to WifiEntry.ConnectedInfo for displaying in Network Details page. Bug: 117216087 Test: build Change-Id: Ibd4a9b229abc83965c1d7186a4149937e8d2b118 --- libs/WifiTrackerLib/src/com/android/wifitrackerlib/WifiEntry.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libs/WifiTrackerLib/src/com/android/wifitrackerlib/WifiEntry.java b/libs/WifiTrackerLib/src/com/android/wifitrackerlib/WifiEntry.java index 675c80d0a..92c2ed531 100644 --- a/libs/WifiTrackerLib/src/com/android/wifitrackerlib/WifiEntry.java +++ b/libs/WifiTrackerLib/src/com/android/wifitrackerlib/WifiEntry.java @@ -28,6 +28,7 @@ import android.net.NetworkCapabilities; import android.net.NetworkInfo; import android.net.NetworkUtils; import android.net.RouteInfo; +import android.net.wifi.ScanResult; import android.net.wifi.WifiConfiguration; import android.net.wifi.WifiInfo; import android.net.wifi.WifiManager; @@ -371,6 +372,7 @@ public abstract class WifiEntry implements Comparable { public List ipv6Addresses = new ArrayList<>(); public String gateway; public String subnetMask; + public int wifiStandard = ScanResult.WIFI_STANDARD_UNKNOWN; } // User actions on a network @@ -648,6 +650,7 @@ public abstract class WifiEntry implements Comparable { } mConnectedInfo.frequencyMhz = wifiInfo.getFrequency(); mConnectedInfo.linkSpeedMbps = wifiInfo.getLinkSpeed(); + mConnectedInfo.wifiStandard = wifiInfo.getWifiStandard(); } } else { // Connection info doesn't matched, so this network is disconnected mNetworkInfo = null; -- cgit v1.2.3