diff --git a/runner/android_junit_runner/CHANGELOG.md b/runner/android_junit_runner/CHANGELOG.md index 57f2785e5..9621cb4e3 100644 --- a/runner/android_junit_runner/CHANGELOG.md +++ b/runner/android_junit_runner/CHANGELOG.md @@ -9,6 +9,7 @@ * Exceptions during `@AfterClass` were not being reported via `InstrumentationResultPrinter`. * Exceptions arising in AndroidJUnitRunner.buildRequest are now handled. * Assumption failures during a ClassRule or BeforeClass are now reported more consistently via `InstrumentationResultPrinter` +* Clarify SdkSuppress reference docs **New Features** diff --git a/runner/android_junit_runner/java/androidx/test/filters/SdkSuppress.java b/runner/android_junit_runner/java/androidx/test/filters/SdkSuppress.java index 5c64217a9..2fb7054d6 100644 --- a/runner/android_junit_runner/java/androidx/test/filters/SdkSuppress.java +++ b/runner/android_junit_runner/java/androidx/test/filters/SdkSuppress.java @@ -21,10 +21,15 @@ import java.lang.annotation.Target; /** - * Indicates that a specific test or class should or should not be run on certain API levels. + * Indicates that a specific test or class should not be run on certain API levels. * - *

Test(s) will be skipped when executed on android platforms less/more than specified level - * (inclusive) or executed on an android platform whose SDK level is in the excludedSdks list. + *

Test(s) will be skipped when executed on Android platforms with SDK API level: + * + *

* *

If {@code @SdkSuppress} is applied at both the class and test method, the test method * annotation takes precedence, and the class level {@code @SdkSuppress} is ignored. @@ -36,8 +41,10 @@ int minSdkVersion() default 1; /** The maximum API level to execute (inclusive) */ int maxSdkVersion() default Integer.MAX_VALUE; - /** The list of SDK versions to exclude */ + + /** The (additional) list of SDK versions to exclude */ int[] excludedSdks() default {}; + /** * The {@link android.os.Build.VERSION.CODENAME} to execute on. This is intended to be used to run * on a pre-release SDK, where the {@link android.os.Build.VERSION.SDK_INT} has not yet been