diff options
author | lesl <lesl@google.com> | 2020-12-04 13:59:46 +0800 |
---|---|---|
committer | lesl <lesl@google.com> | 2020-12-04 13:59:46 +0800 |
commit | 9f8b4a8e4c5bfe26176f7398d8122d7f78d800a4 (patch) | |
tree | f279bd5a795e0d67916f800046090cec3d0c2070 /wifi/tests | |
parent | b88267cb22d62171722816329bde81fb01a4e17a (diff) |
wifi: Remove internal function, add version checks when using new API
1. Remove internal function
2. Add the version check in new APIs which miss it before
Bug: 173791707
Test: S module on R base image boots and connects to wifi and SAP
enable succeed.
Change-Id: Ic9ea9fecfa7d39f54a1875ad687fe21c1381124c
Diffstat (limited to 'wifi/tests')
-rw-r--r-- | wifi/tests/src/android/net/wifi/SoftApConfigurationTest.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/wifi/tests/src/android/net/wifi/SoftApConfigurationTest.java b/wifi/tests/src/android/net/wifi/SoftApConfigurationTest.java index ad0fdd3bce26..bcfdf7d80061 100644 --- a/wifi/tests/src/android/net/wifi/SoftApConfigurationTest.java +++ b/wifi/tests/src/android/net/wifi/SoftApConfigurationTest.java @@ -20,6 +20,7 @@ import static com.google.common.truth.Truth.assertThat; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; +import static org.junit.Assume.assumeTrue; import android.net.MacAddress; import android.os.Parcel; @@ -371,6 +372,7 @@ public class SoftApConfigurationTest { @Test public void testDualBands() { + assumeTrue(SdkLevel.isAtLeastS()); int[] dual_bands = new int[2]; dual_bands[0] = SoftApConfiguration.BAND_2GHZ; dual_bands[1] = SoftApConfiguration.BAND_5GHZ; @@ -384,6 +386,7 @@ public class SoftApConfigurationTest { @Test public void testDualChannels() { + assumeTrue(SdkLevel.isAtLeastS()); int[] expected_dual_bands = new int[2]; expected_dual_bands[0] = SoftApConfiguration.BAND_2GHZ; expected_dual_bands[1] = SoftApConfiguration.BAND_5GHZ; @@ -417,6 +420,7 @@ public class SoftApConfigurationTest { @Test public void testInvalidBandWhenSetBands() { + assumeTrue(SdkLevel.isAtLeastS()); boolean isIllegalArgumentExceptionHappened = false; int[] dual_bands = new int[2]; dual_bands[0] = SoftApConfiguration.BAND_2GHZ; @@ -457,6 +461,7 @@ public class SoftApConfigurationTest { @Test public void testInvalidConfigWhenSetChannels() { + assumeTrue(SdkLevel.isAtLeastS()); boolean isIllegalArgumentExceptionHappened = false; SparseIntArray invalid_channels = new SparseIntArray(); try { |