Loading wifi/java/android/net/wifi/SoftApConfiguration.java +6 −9 Original line number Diff line number Diff line Loading @@ -538,15 +538,6 @@ public final class SoftApConfiguration implements Parcelable { if (!SdkLevel.isAtLeastS()) { throw new UnsupportedOperationException(); } return getChannelsInternal(); } /** * Internal version bypassing SdkLevel checks * TODO(b/173791707): find a better way to allow Wifi to call its own new S APIs. * @hide */ public @NonNull SparseIntArray getChannelsInternal() { return mChannels.clone(); } Loading Loading @@ -945,6 +936,9 @@ public final class SoftApConfiguration implements Parcelable { */ @NonNull public Builder setBands(@NonNull int[] bands) { if (!SdkLevel.isAtLeastS()) { throw new UnsupportedOperationException(); } if (bands.length == 0 || bands.length > 2) { throw new IllegalArgumentException("Unsupported number of bands(" + bands.length + ") configured"); Loading Loading @@ -1036,6 +1030,9 @@ public final class SoftApConfiguration implements Parcelable { */ @NonNull public Builder setChannels(@NonNull SparseIntArray channels) { if (!SdkLevel.isAtLeastS()) { throw new UnsupportedOperationException(); } if (channels.size() == 0 || channels.size() > 2) { throw new IllegalArgumentException("Unsupported number of channels(" + channels.size() + ") configured"); Loading wifi/java/android/net/wifi/SoftApInfo.java +0 −9 Original line number Diff line number Diff line Loading @@ -183,15 +183,6 @@ public final class SoftApInfo implements Parcelable { if (!SdkLevel.isAtLeastS()) { throw new UnsupportedOperationException(); } return getWifiStandardInternal(); } /** * Internal version bypassing SdkLevel checks * TODO(b/173791707): find a better way to allow Wifi to call its own new S APIs. * @hide */ public @WifiAnnotations.WifiStandard int getWifiStandardInternal() { return mWifiStandard; } Loading wifi/tests/src/android/net/wifi/SoftApConfigurationTest.java +5 −0 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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; Loading @@ -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; Loading Loading @@ -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; Loading Loading @@ -457,6 +461,7 @@ public class SoftApConfigurationTest { @Test public void testInvalidConfigWhenSetChannels() { assumeTrue(SdkLevel.isAtLeastS()); boolean isIllegalArgumentExceptionHappened = false; SparseIntArray invalid_channels = new SparseIntArray(); try { Loading Loading
wifi/java/android/net/wifi/SoftApConfiguration.java +6 −9 Original line number Diff line number Diff line Loading @@ -538,15 +538,6 @@ public final class SoftApConfiguration implements Parcelable { if (!SdkLevel.isAtLeastS()) { throw new UnsupportedOperationException(); } return getChannelsInternal(); } /** * Internal version bypassing SdkLevel checks * TODO(b/173791707): find a better way to allow Wifi to call its own new S APIs. * @hide */ public @NonNull SparseIntArray getChannelsInternal() { return mChannels.clone(); } Loading Loading @@ -945,6 +936,9 @@ public final class SoftApConfiguration implements Parcelable { */ @NonNull public Builder setBands(@NonNull int[] bands) { if (!SdkLevel.isAtLeastS()) { throw new UnsupportedOperationException(); } if (bands.length == 0 || bands.length > 2) { throw new IllegalArgumentException("Unsupported number of bands(" + bands.length + ") configured"); Loading Loading @@ -1036,6 +1030,9 @@ public final class SoftApConfiguration implements Parcelable { */ @NonNull public Builder setChannels(@NonNull SparseIntArray channels) { if (!SdkLevel.isAtLeastS()) { throw new UnsupportedOperationException(); } if (channels.size() == 0 || channels.size() > 2) { throw new IllegalArgumentException("Unsupported number of channels(" + channels.size() + ") configured"); Loading
wifi/java/android/net/wifi/SoftApInfo.java +0 −9 Original line number Diff line number Diff line Loading @@ -183,15 +183,6 @@ public final class SoftApInfo implements Parcelable { if (!SdkLevel.isAtLeastS()) { throw new UnsupportedOperationException(); } return getWifiStandardInternal(); } /** * Internal version bypassing SdkLevel checks * TODO(b/173791707): find a better way to allow Wifi to call its own new S APIs. * @hide */ public @WifiAnnotations.WifiStandard int getWifiStandardInternal() { return mWifiStandard; } Loading
wifi/tests/src/android/net/wifi/SoftApConfigurationTest.java +5 −0 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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; Loading @@ -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; Loading Loading @@ -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; Loading Loading @@ -457,6 +461,7 @@ public class SoftApConfigurationTest { @Test public void testInvalidConfigWhenSetChannels() { assumeTrue(SdkLevel.isAtLeastS()); boolean isIllegalArgumentExceptionHappened = false; SparseIntArray invalid_channels = new SparseIntArray(); try { Loading