summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSunil Ravi <sunilravi@google.com>2019-10-28 18:03:19 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2019-10-28 18:03:19 +0000
commitf1446a8dd1617a81df6dcf7398cd4cf242b8711b (patch)
tree00cc292818c0075442effd99729e115192c9014d
parent36efc76276cd2a66a61ac36f41c9c75c5b7ad907 (diff)
parent18b0feceb73b1465635b0153e4cf88eb51ce4614 (diff)
Merge "Change WIFI_FEATURE_XXX type from int to long"
-rw-r--r--service/java/com/android/server/wifi/SupplicantStaIfaceHal.java4
-rw-r--r--service/java/com/android/server/wifi/WifiVendorHal.java8
-rw-r--r--tests/wifitests/src/com/android/server/wifi/ClientModeImplTest.java8
-rw-r--r--tests/wifitests/src/com/android/server/wifi/WifiVendorHalTest.java8
4 files changed, 14 insertions, 14 deletions
diff --git a/service/java/com/android/server/wifi/SupplicantStaIfaceHal.java b/service/java/com/android/server/wifi/SupplicantStaIfaceHal.java
index 8db806e59..0a01852ff 100644
--- a/service/java/com/android/server/wifi/SupplicantStaIfaceHal.java
+++ b/service/java/com/android/server/wifi/SupplicantStaIfaceHal.java
@@ -2604,10 +2604,10 @@ public class SupplicantStaIfaceHal {
* This is a v1.2+ HAL feature.
* On error, or if these features are not supported, 0 is returned.
*/
- public int getAdvancedKeyMgmtCapabilities(@NonNull String ifaceName) {
+ public long getAdvancedKeyMgmtCapabilities(@NonNull String ifaceName) {
final String methodStr = "getAdvancedKeyMgmtCapabilities";
- int advancedCapabilities = 0;
+ long advancedCapabilities = 0;
int keyMgmtCapabilities = getKeyMgmtCapabilities(ifaceName);
if ((keyMgmtCapabilities & android.hardware.wifi.supplicant.V1_2.ISupplicantStaNetwork
diff --git a/service/java/com/android/server/wifi/WifiVendorHal.java b/service/java/com/android/server/wifi/WifiVendorHal.java
index a1d98061b..ea8c7688f 100644
--- a/service/java/com/android/server/wifi/WifiVendorHal.java
+++ b/service/java/com/android/server/wifi/WifiVendorHal.java
@@ -1068,7 +1068,7 @@ public class WifiVendorHal {
/**
* Translation table used by getSupportedFeatureSet for translating IWifiChip caps for V1.1
*/
- private static final int[][] sChipFeatureCapabilityTranslation = {
+ private static final long[][] sChipFeatureCapabilityTranslation = {
{WifiManager.WIFI_FEATURE_TX_POWER_LIMIT,
android.hardware.wifi.V1_1.IWifiChip.ChipCapabilityMask.SET_TX_POWER_LIMIT
},
@@ -1135,7 +1135,7 @@ public class WifiVendorHal {
/**
* Translation table used by getSupportedFeatureSet for translating IWifiStaIface caps
*/
- private static final int[][] sStaFeatureCapabilityTranslation = {
+ private static final long[][] sStaFeatureCapabilityTranslation = {
{WifiManager.WIFI_FEATURE_INFRA_5G,
IWifiStaIface.StaIfaceCapabilityMask.STA_5G
},
@@ -1184,8 +1184,8 @@ public class WifiVendorHal {
* @return bitmask defined by WifiManager.WIFI_FEATURE_*
*/
@VisibleForTesting
- int wifiFeatureMaskFromStaCapabilities(int capabilities) {
- int features = 0;
+ long wifiFeatureMaskFromStaCapabilities(int capabilities) {
+ long features = 0;
for (int i = 0; i < sStaFeatureCapabilityTranslation.length; i++) {
if ((capabilities & sStaFeatureCapabilityTranslation[i][1]) != 0) {
features |= sStaFeatureCapabilityTranslation[i][0];
diff --git a/tests/wifitests/src/com/android/server/wifi/ClientModeImplTest.java b/tests/wifitests/src/com/android/server/wifi/ClientModeImplTest.java
index da574b493..61d6c27df 100644
--- a/tests/wifitests/src/com/android/server/wifi/ClientModeImplTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/ClientModeImplTest.java
@@ -1840,10 +1840,10 @@ public class ClientModeImplTest extends WifiBaseTest {
/** Verifies that syncGetSupportedFeatures() masks out capabilities based on system flags. */
@Test
public void syncGetSupportedFeatures() {
- final int featureAware = WifiManager.WIFI_FEATURE_AWARE;
- final int featureInfra = WifiManager.WIFI_FEATURE_INFRA;
- final int featureD2dRtt = WifiManager.WIFI_FEATURE_D2D_RTT;
- final int featureD2apRtt = WifiManager.WIFI_FEATURE_D2AP_RTT;
+ final long featureAware = WifiManager.WIFI_FEATURE_AWARE;
+ final long featureInfra = WifiManager.WIFI_FEATURE_INFRA;
+ final long featureD2dRtt = WifiManager.WIFI_FEATURE_D2D_RTT;
+ final long featureD2apRtt = WifiManager.WIFI_FEATURE_D2AP_RTT;
final long featureLongBits = 0x1100000000L;
assertEquals(0, testGetSupportedFeaturesCase(0, false));
diff --git a/tests/wifitests/src/com/android/server/wifi/WifiVendorHalTest.java b/tests/wifitests/src/com/android/server/wifi/WifiVendorHalTest.java
index fc0cdd63b..561902e86 100644
--- a/tests/wifitests/src/com/android/server/wifi/WifiVendorHalTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/WifiVendorHalTest.java
@@ -732,7 +732,7 @@ public class WifiVendorHalTest extends WifiBaseTest {
IWifiStaIface.StaIfaceCapabilityMask.BACKGROUND_SCAN
| IWifiStaIface.StaIfaceCapabilityMask.LINK_LAYER_STATS
);
- int expected = (
+ long expected = (
WifiManager.WIFI_FEATURE_SCANNER
| WifiManager.WIFI_FEATURE_LINK_LAYER_STATS);
assertEquals(expected, mWifiVendorHal.wifiFeatureMaskFromStaCapabilities(caps));
@@ -751,7 +751,7 @@ public class WifiVendorHalTest extends WifiBaseTest {
| android.hardware.wifi.V1_1.IWifiChip.ChipCapabilityMask.D2D_RTT
| android.hardware.wifi.V1_1.IWifiChip.ChipCapabilityMask.D2AP_RTT
);
- int expected = (
+ long expected = (
WifiManager.WIFI_FEATURE_TX_POWER_LIMIT
| WifiManager.WIFI_FEATURE_D2D_RTT
| WifiManager.WIFI_FEATURE_D2AP_RTT
@@ -770,7 +770,7 @@ public class WifiVendorHalTest extends WifiBaseTest {
android.hardware.wifi.V1_3.IWifiChip.ChipCapabilityMask.SET_LATENCY_MODE
| android.hardware.wifi.V1_1.IWifiChip.ChipCapabilityMask.D2D_RTT
);
- int expected = (
+ long expected = (
WifiManager.WIFI_FEATURE_LOW_LATENCY
| WifiManager.WIFI_FEATURE_D2D_RTT
);
@@ -796,7 +796,7 @@ public class WifiVendorHalTest extends WifiBaseTest {
add(IfaceType.STA);
add(IfaceType.P2P);
}};
- int expectedFeatureSet = (
+ long expectedFeatureSet = (
WifiManager.WIFI_FEATURE_SCANNER
| WifiManager.WIFI_FEATURE_LINK_LAYER_STATS
| WifiManager.WIFI_FEATURE_TX_POWER_LIMIT