Skip hostside tethering test if not SdkLevel.isAtLeastB()

HostsideTetheringTest#testSoftApConfigurationRedactedForOtherApps is
only applicable in B+, so skip it if not.

Bug: 403129363
Test: atest HostsideTetheringTests
Change-Id: I6b4be858befcabb1892ee4113ac2cf17b5d49ca5
This commit is contained in:
Quang Anh Luong 2025-03-19 12:46:45 +09:00
commit cd2b87e4c9

View file

@ -23,6 +23,7 @@ import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentat
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assume.assumeTrue;
import android.content.Context;
import android.net.TetheringInterface;
@ -31,6 +32,8 @@ import android.net.cts.util.CtsTetheringUtils.TestTetheringEventCallback;
import android.net.wifi.SoftApConfiguration;
import android.net.wifi.WifiSsid;
import com.android.modules.utils.build.SdkLevel;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
@ -64,6 +67,8 @@ public class TetheringTest {
*/
@Test
public void testSoftApConfigurationRedactedForOtherUids() throws Exception {
assumeTrue(SdkLevel.isAtLeastB());
mTetheringEventCallback.assumeWifiTetheringSupported(
getInstrumentation().getTargetContext());
SoftApConfiguration softApConfig = new SoftApConfiguration.Builder()