Add an annotation to skip tests if the APK has target SDK > 31.

This skips a test if the APK it's running in targets an SDK
above 31. This allows us to add such tests to CtsNetTestCases,
which is currently targeting SDK 33.

By using the annotation as an include-annotation filter in
AndroidTestTemplate.xml, this makes it very easy to create a
clone of CtsNetTestCases that targets SDK 31 and which only runs
tests annotated with this annotation. Thus, CtsNetTestCases and
CtsNetTestCasesLatestSdk will run all tests that pass if target
SDK is 33, and CtsNetTestCasesMaxTargetSdk31 will only run the
tests that requires target SDK 31. See other CL in topic.

Bug: 233553525
Test: atest CtsNetTestCasesMaxTargetSdk31:android.net.LinkPropertiesTest
Test: atest CtsNetTestCasesLatestSdk:android.net.LinkPropertiesTest
Change-Id: Ib5df3bbc659d6a737a846fdf57cddee002e4e9ae
2 files changed
tree: a5391897cd351ef0c2f52b289f076035cd45d392
  1. staticlibs/