From 137bbed860487dbde010fef257ec95f3692b1e8d Mon Sep 17 00:00:00 2001 From: Chiachang Wang Date: Fri, 11 Feb 2022 15:32:30 +0800 Subject: [PATCH] Refer to SDK constant defined in DevSdkIgnoreRule Refer to the same constant definition as other tests instead of hard coding locally, so that it won't be missed as changing to Build.VERSION_CODES.SC_V2. Bug: 184750836 Test: atest FrameworksNetTests Change-Id: I3c17c414d830af03e2719c5dab1a664c55f6df2a --- tests/unit/java/android/net/Ikev2VpnProfileTest.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/unit/java/android/net/Ikev2VpnProfileTest.java b/tests/unit/java/android/net/Ikev2VpnProfileTest.java index c3d3bf7827..8559c2080a 100644 --- a/tests/unit/java/android/net/Ikev2VpnProfileTest.java +++ b/tests/unit/java/android/net/Ikev2VpnProfileTest.java @@ -16,6 +16,8 @@ package android.net; +import static com.android.testutils.DevSdkIgnoreRuleKt.SC_V2; + import static org.junit.Assert.assertArrayEquals; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; @@ -264,8 +266,8 @@ public class Ikev2VpnProfileTest { } - // TODO: Refer to Build.VERSION_CODES.SC_V2 when it's available in AOSP - @DevSdkIgnoreRule.IgnoreUpTo(32) + // TODO: Refer to Build.VERSION_CODES.SC_V2 when it's available in AOSP and mainline branch + @DevSdkIgnoreRule.IgnoreUpTo(SC_V2) @Test public void testBuildExcludeLocalRoutesSet() throws Exception { final Ikev2VpnProfile.Builder builder = getBuilderWithDefaultOptions();