From 162424ec2c9f0cfcb05c3225c8d8b54bdb70446a Mon Sep 17 00:00:00 2001 From: lesl Date: Thu, 20 Feb 2020 17:44:24 +0800 Subject: wifi: Use long to replace int for softap feature set Bug: 149871866 Test: atest FrameworksWifiTests Change-Id: I3b02c1c06a907d375a06692eb3019194fbede484 --- .../wifitests/src/com/android/server/wifi/SoftApManagerTest.java | 8 ++++---- .../src/com/android/server/wifi/util/ApConfigUtilTest.java | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'tests') diff --git a/tests/wifitests/src/com/android/server/wifi/SoftApManagerTest.java b/tests/wifitests/src/com/android/server/wifi/SoftApManagerTest.java index e37e3a71e..c634b6da1 100644 --- a/tests/wifitests/src/com/android/server/wifi/SoftApManagerTest.java +++ b/tests/wifitests/src/com/android/server/wifi/SoftApManagerTest.java @@ -165,7 +165,7 @@ public class SoftApManagerTest extends WifiBaseTest { mTestSoftApInfo.setFrequency(TEST_AP_FREQUENCY); mTestSoftApInfo.setBandwidth(TEST_AP_BANDWIDTH_IN_SOFTAPINFO); // Default set up all features support. - int testSoftApFeature = SoftApCapability.SOFTAP_FEATURE_CLIENT_FORCE_DISCONNECT + long testSoftApFeature = SoftApCapability.SOFTAP_FEATURE_CLIENT_FORCE_DISCONNECT | SoftApCapability.SOFTAP_FEATURE_ACS_OFFLOAD | SoftApCapability.SOFTAP_FEATURE_WPA3_SAE; mTestSoftApCapability = new SoftApCapability(testSoftApFeature); @@ -1794,7 +1794,7 @@ public class SoftApManagerTest extends WifiBaseTest { @Test public void testForceClientDisconnectNotInvokeWhenNotSupport() throws Exception { - int testSoftApFeature = SoftApCapability.SOFTAP_FEATURE_WPA3_SAE + long testSoftApFeature = SoftApCapability.SOFTAP_FEATURE_WPA3_SAE | SoftApCapability.SOFTAP_FEATURE_ACS_OFFLOAD; SoftApCapability noClientControlCapability = new SoftApCapability(testSoftApFeature); noClientControlCapability.setMaxSupportedClients(1); @@ -1833,7 +1833,7 @@ public class SoftApManagerTest extends WifiBaseTest { @Test public void testSoftApEnableFailureBecauseSetMaxClientWhenNotSupport() throws Exception { - int testSoftApFeature = SoftApCapability.SOFTAP_FEATURE_WPA3_SAE + long testSoftApFeature = SoftApCapability.SOFTAP_FEATURE_WPA3_SAE | SoftApCapability.SOFTAP_FEATURE_ACS_OFFLOAD; when(mWifiNative.setupInterfaceForSoftApMode(any())).thenReturn(TEST_INTERFACE_NAME); SoftApCapability noClientControlCapability = new SoftApCapability(testSoftApFeature); @@ -1868,7 +1868,7 @@ public class SoftApManagerTest extends WifiBaseTest { @Test public void testSoftApEnableFailureBecauseSecurityTypeSaeSetupButSaeNotSupport() throws Exception { - int testSoftApFeature = SoftApCapability.SOFTAP_FEATURE_CLIENT_FORCE_DISCONNECT + long testSoftApFeature = SoftApCapability.SOFTAP_FEATURE_CLIENT_FORCE_DISCONNECT | SoftApCapability.SOFTAP_FEATURE_ACS_OFFLOAD; when(mWifiNative.setupInterfaceForSoftApMode(any())).thenReturn(TEST_INTERFACE_NAME); SoftApCapability noSaeCapability = new SoftApCapability(testSoftApFeature); diff --git a/tests/wifitests/src/com/android/server/wifi/util/ApConfigUtilTest.java b/tests/wifitests/src/com/android/server/wifi/util/ApConfigUtilTest.java index 9f235aa34..01c5795ea 100644 --- a/tests/wifitests/src/com/android/server/wifi/util/ApConfigUtilTest.java +++ b/tests/wifitests/src/com/android/server/wifi/util/ApConfigUtilTest.java @@ -445,7 +445,7 @@ public class ApConfigUtilTest extends WifiBaseTest { @Test public void testSoftApCapabilityInitWithResourceValue() throws Exception { - int testFeatures = SoftApCapability.SOFTAP_FEATURE_CLIENT_FORCE_DISCONNECT; + long testFeatures = SoftApCapability.SOFTAP_FEATURE_CLIENT_FORCE_DISCONNECT; SoftApCapability capability = new SoftApCapability(testFeatures); int test_max_client = 10; capability.setMaxSupportedClients(test_max_client); -- cgit v1.2.3