summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAhmed ElArabawy <arabawy@google.com>2020-03-10 00:47:02 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2020-03-10 00:47:02 +0000
commit4a0b750857385b8ddc49804d4ddcb2577e312b11 (patch)
tree23c93d5aa09da7edeaa9293680b66900dab2a56d
parentddd7dec67cdbef7831588425b0632857d812d94c (diff)
parent0d5e8f5309fe147a16e0f4277cce41c39b324bfc (diff)
Merge "Use WifiAnnotations instead of ScanResult for annotations" into rvc-dev
-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 f13983898..6eed8166e 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 5c384f595..bb0ba82ef 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);
}