Skip NetworkStatsManager CTS test before T.
The corresponding class was only mainlined in T so there is no
need to run this test on previous Android versions (which must
already have passed it on device ship).
To do this, switch to JUnit 4 so we can use DevSdkIgnoreRunner.
Make setUp and tearDown public (as required by JUnit 4) and move
the AppModeFull annotation to the class level to avoid repeating
it on every test method. Also switch to getting the
instrumentation the instrumentation and the context from
InstrumentationRegistry since getInstrumentation() returns null.
Bug: 204830222
Test: atest CtsNetTestCases:NetworkStatsManagerTest
Test: atest --instant CtsNetTestCasesLatestSdk:android.net.cts.NetworkStatsManagerTest (skips all tests)
Test: atest CtsNetTestCasesLatestSdk:android.net.cts.NetworkStatsManagerTest on S device (skips all tests)
Change-Id: Ie5689ba6e7826e51c76257cf66bd8fef846376f7
1 file changed