Google은 흑인 공동체를 위한 인종 간 평등을 진전시키기 위해 노력하고 있습니다. Google에서 어떤 노력을 하고 있는지 확인하세요.

SdkSuppress

public abstract @interface SdkSuppress
implements Annotation

androidx.test.filters.SdkSuppress


Indicates that a specific test or class requires a minimum or maximum API Level to execute.

Test(s) will be skipped when executed on android platforms less/more than specified level (inclusive).

Summary

Public methods

String codeName()

The ERROR(/android.os.Build.VERSION.CODENAME) to execute on.

int maxSdkVersion()

The maximum API level to execute (inclusive)

int minSdkVersion()

The minimum API level to execute (inclusive)

Inherited methods

From interface java.lang.annotation.Annotation

Public methods

codeName

String codeName ()

The ERROR(/android.os.Build.VERSION.CODENAME) to execute on. This is intended to be used to run on a pre-release SDK, where the ERROR(/android.os.Build.VERSION.SDK_INT) has not yet been finalized. This is treated as an OR operation with respect to the minSdkVersion and maxSdkVersion attributes.

For example, to filter a test so it runs on only the prerelease R SDK: @SdkSuppress(minSdkVersion = Build.VERSION_CODES.R, codeName = "R")

Returns
String

maxSdkVersion

int maxSdkVersion ()

The maximum API level to execute (inclusive)

Returns
int

minSdkVersion

int minSdkVersion ()

The minimum API level to execute (inclusive)

Returns
int