From cd2b87e4c929ee3fb37798ed71f9c077335a2124 Mon Sep 17 00:00:00 2001 From: Quang Anh Luong Date: Wed, 19 Mar 2025 12:46:45 +0900 Subject: [PATCH] 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 --- .../app/src/com/android/cts/net/hostside/TetheringTest.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/cts/hostside/app/src/com/android/cts/net/hostside/TetheringTest.java b/tests/cts/hostside/app/src/com/android/cts/net/hostside/TetheringTest.java index a1cf96867f..65844a362a 100644 --- a/tests/cts/hostside/app/src/com/android/cts/net/hostside/TetheringTest.java +++ b/tests/cts/hostside/app/src/com/android/cts/net/hostside/TetheringTest.java @@ -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()