diff options
| author | Chiachang Wang <chiachangwang@google.com> | 2022-01-07 16:05:27 +0800 |
|---|---|---|
| committer | Chiachang Wang <chiachangwang@google.com> | 2022-01-20 10:30:19 +0800 |
| commit | 7212fbee14c6d95f44a7adcea8a6ef21366e2730 (patch) | |
| tree | 34cd920c80b4e706273cc15353356dde6420e97a /tests/unit/java/android/net/NetworkStatsAccessTest.java | |
| parent | 7aac4ad2f793734bffb8e5acb5dfd2e959160d9a (diff) | |
Update the SDK for the tests with intended target in T+
Correct the SDK for those tests are expected running in T+
device. Check @IgnoreUpTo(S) may be incorrect after receiving
patches before T release.
Refer to temporary constant definition in DevSdkIgnoreRule until
the SDK constant being pushed into AOSP and synced with branch
used for mainline.
BUg: 215294242
Test: atest CtsNetTestCases CtsNetTestCasesLatestSdk
Change-Id: Ide6a241f7944dd1e75bc33b21aa29471a5df94c6
Diffstat (limited to 'tests/unit/java/android/net/NetworkStatsAccessTest.java')
| -rw-r--r-- | tests/unit/java/android/net/NetworkStatsAccessTest.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/unit/java/android/net/NetworkStatsAccessTest.java b/tests/unit/java/android/net/NetworkStatsAccessTest.java index e4fc1186ff..97a93ca48c 100644 --- a/tests/unit/java/android/net/NetworkStatsAccessTest.java +++ b/tests/unit/java/android/net/NetworkStatsAccessTest.java @@ -16,6 +16,8 @@ package android.net; +import static com.android.testutils.DevSdkIgnoreRuleKt.SC_V2; + import static org.junit.Assert.assertEquals; import static org.mockito.Mockito.when; @@ -25,7 +27,6 @@ import android.app.AppOpsManager; import android.app.admin.DevicePolicyManager; import android.content.Context; import android.content.pm.PackageManager; -import android.os.Build; import android.telephony.TelephonyManager; import androidx.test.filters.SmallTest; @@ -42,7 +43,7 @@ import org.mockito.MockitoAnnotations; @RunWith(DevSdkIgnoreRunner.class) @SmallTest -@DevSdkIgnoreRule.IgnoreUpTo(Build.VERSION_CODES.S) +@DevSdkIgnoreRule.IgnoreUpTo(SC_V2) // TODO: Use to Build.VERSION_CODES.SC_V2 when available public class NetworkStatsAccessTest { private static final String TEST_PKG = "com.example.test"; private static final int TEST_PID = 1234; |
