summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorAhmed ElArabawy <arabawy@google.com>2020-02-19 15:22:42 -0800
committerAhmed ElArabawy <arabawy@google.com>2020-03-04 13:53:12 -0800
commit0d5e8f5309fe147a16e0f4277cce41c39b324bfc (patch)
tree52cb08e5f12a27addacf34d8b2280cac4b842de4 /service
parent247bc4b2c6a8902bd2c9793b8dfec83a7e5d5115 (diff)
Use WifiAnnotations instead of ScanResult for annotations
This commit uses WifiAnnotations.WifiStandard instead of ScanResult.WifiStandard Bug: 149420144 Test: Builds correctly (no new functionality in commit) Change-Id: I6fcbd041994b92035680fdd896845aa496f06180
Diffstat (limited to 'service')
-rw-r--r--service/java/com/android/server/wifi/ClientModeImpl.java3
-rw-r--r--service/java/com/android/server/wifi/SupplicantStaIfaceHal.java3
-rw-r--r--service/java/com/android/server/wifi/ThroughputPredictor.java5
-rw-r--r--service/java/com/android/server/wifi/WifiNative.java6
-rw-r--r--service/java/com/android/server/wifi/WifiServiceImpl.java3
5 files changed, 12 insertions, 8 deletions
diff --git a/service/java/com/android/server/wifi/ClientModeImpl.java b/service/java/com/android/server/wifi/ClientModeImpl.java
index 01492f939..bfceb503a 100644
--- a/service/java/com/android/server/wifi/ClientModeImpl.java
+++ b/service/java/com/android/server/wifi/ClientModeImpl.java
@@ -70,6 +70,7 @@ import android.net.wifi.INetworkRequestMatchCallback;
import android.net.wifi.ITxPacketCountListener;
import android.net.wifi.ScanResult;
import android.net.wifi.SupplicantState;
+import android.net.wifi.WifiAnnotations.WifiStandard;
import android.net.wifi.WifiConfiguration;
import android.net.wifi.WifiEnterpriseConfig;
import android.net.wifi.WifiInfo;
@@ -1342,7 +1343,7 @@ public class ClientModeImpl extends StateMachine {
* @param standard A value from {@link ScanResult}'s {@code WIFI_STANDARD_}
* @return {@code true} if standard is supported, {@code false} otherwise.
*/
- public boolean isWifiStandardSupported(@ScanResult.WifiStandard int standard) {
+ public boolean isWifiStandardSupported(@WifiStandard int standard) {
return mWifiNative.isWifiStandardSupported(mInterfaceName, standard);
}
diff --git a/service/java/com/android/server/wifi/SupplicantStaIfaceHal.java b/service/java/com/android/server/wifi/SupplicantStaIfaceHal.java
index cc63d2f93..2f4e0b4b1 100644
--- a/service/java/com/android/server/wifi/SupplicantStaIfaceHal.java
+++ b/service/java/com/android/server/wifi/SupplicantStaIfaceHal.java
@@ -44,6 +44,7 @@ import android.hardware.wifi.supplicant.V1_3.WpaDriverCapabilitiesMask;
import android.hidl.manager.V1_0.IServiceManager;
import android.hidl.manager.V1_0.IServiceNotification;
import android.net.wifi.ScanResult;
+import android.net.wifi.WifiAnnotations.WifiStandard;
import android.net.wifi.WifiConfiguration;
import android.os.Handler;
import android.os.IHwBinder.DeathRecipient;
@@ -2916,7 +2917,7 @@ public class SupplicantStaIfaceHal {
return featureSet;
}
- private @ScanResult.WifiStandard int getWifiStandardFromCap(ConnectionCapabilities capa) {
+ private @WifiStandard int getWifiStandardFromCap(ConnectionCapabilities capa) {
switch(capa.technology) {
case WifiTechnology.HE:
return ScanResult.WIFI_STANDARD_11AX;
diff --git a/service/java/com/android/server/wifi/ThroughputPredictor.java b/service/java/com/android/server/wifi/ThroughputPredictor.java
index 6db0ef4b9..e381b2b14 100644
--- a/service/java/com/android/server/wifi/ThroughputPredictor.java
+++ b/service/java/com/android/server/wifi/ThroughputPredictor.java
@@ -21,6 +21,7 @@ import static com.android.server.wifi.util.InformationElementUtil.BssLoad.MIN_CH
import android.annotation.NonNull;
import android.net.wifi.ScanResult;
+import android.net.wifi.WifiAnnotations.WifiStandard;
import android.net.wifi.WifiInfo;
import android.net.wifi.nl80211.DeviceWiphyCapabilities;
import android.util.Log;
@@ -163,7 +164,7 @@ public class ThroughputPredictor {
* @return predicted throughput in Mbps
*/
public int predictThroughput(DeviceWiphyCapabilities deviceCapabilities,
- @ScanResult.WifiStandard int wifiStandardAp,
+ @WifiStandard int wifiStandardAp,
int channelWidthAp, int rssiDbm, int frequency, int maxNumSpatialStreamAp,
int channelUtilizationBssLoad, int channelUtilizationLinkLayerStats,
boolean isBluetoothConnected) {
@@ -245,7 +246,7 @@ public class ThroughputPredictor {
channelUtilization);
}
- private int predictThroughputInternal(@ScanResult.WifiStandard int wifiStandard,
+ private int predictThroughputInternal(@WifiStandard int wifiStandard,
int channelWidth, int rssiDbm, int maxNumSpatialStream, int channelUtilization) {
// channel bandwidth in MHz = 20MHz * (2 ^ channelWidthFactor);
diff --git a/service/java/com/android/server/wifi/WifiNative.java b/service/java/com/android/server/wifi/WifiNative.java
index fa76bae50..15f998412 100644
--- a/service/java/com/android/server/wifi/WifiNative.java
+++ b/service/java/com/android/server/wifi/WifiNative.java
@@ -1532,7 +1532,7 @@ public class WifiNative {
return results;
}
- @ScanResult.WifiStandard
+ @WifiAnnotations.WifiStandard
private static int wifiModeToWifiStandard(int wifiMode) {
switch (wifiMode) {
case InformationElementUtil.WifiMode.MODE_11A:
@@ -2888,7 +2888,7 @@ public class WifiNative {
* Class to retrieve connection capability parameters after association
*/
public static class ConnectionCapabilities {
- public @ScanResult.WifiStandard int wifiStandard;
+ public @WifiAnnotations.WifiStandard int wifiStandard;
public int channelBandwidth;
public int maxNumberTxSpatialStreams;
public int maxNumberRxSpatialStreams;
@@ -3538,7 +3538,7 @@ public class WifiNative {
* @return true if the wifi standard is supported on this interface, false otherwise.
*/
public boolean isWifiStandardSupported(@NonNull String ifaceName,
- @ScanResult.WifiStandard int standard) {
+ @WifiAnnotations.WifiStandard int standard) {
synchronized (mLock) {
Iface iface = mIfaceMgr.getIface(ifaceName);
if (iface == null || iface.phyCapabilities == null) {
diff --git a/service/java/com/android/server/wifi/WifiServiceImpl.java b/service/java/com/android/server/wifi/WifiServiceImpl.java
index 4dc45946d..7c2ddc973 100644
--- a/service/java/com/android/server/wifi/WifiServiceImpl.java
+++ b/service/java/com/android/server/wifi/WifiServiceImpl.java
@@ -68,6 +68,7 @@ import android.net.wifi.ScanResult;
import android.net.wifi.SoftApCapability;
import android.net.wifi.SoftApConfiguration;
import android.net.wifi.SoftApInfo;
+import android.net.wifi.WifiAnnotations.WifiStandard;
import android.net.wifi.WifiClient;
import android.net.wifi.WifiConfiguration;
import android.net.wifi.WifiInfo;
@@ -2865,7 +2866,7 @@ public class WifiServiceImpl extends BaseWifiService {
}
@Override
- public boolean isWifiStandardSupported(@ScanResult.WifiStandard int standard) {
+ public boolean isWifiStandardSupported(@WifiStandard int standard) {
return mWifiThreadRunner.call(
() -> mClientModeImpl.isWifiStandardSupported(standard), false);
}