diff --git a/TestingCodelab/app/src/androidTest/java/com/example/compose/rally/AssertScreenshotMatchesGolden.kt b/TestingCodelab/app/src/androidTest/java/com/example/compose/rally/AssertScreenshotMatchesGolden.kt index 5bfd3f5d6..06f21ceb4 100644 --- a/TestingCodelab/app/src/androidTest/java/com/example/compose/rally/AssertScreenshotMatchesGolden.kt +++ b/TestingCodelab/app/src/androidTest/java/com/example/compose/rally/AssertScreenshotMatchesGolden.kt @@ -23,6 +23,7 @@ import androidx.annotation.RequiresApi import androidx.compose.ui.graphics.asAndroidBitmap import androidx.compose.ui.test.SemanticsNodeInteraction import androidx.compose.ui.test.captureToImage +import androidx.test.filters.SdkSuppress import androidx.test.platform.app.InstrumentationRegistry import java.io.FileOutputStream @@ -35,7 +36,7 @@ import java.io.FileOutputStream * * Screenshots are saved on device in `/data/data/{package}/files`. */ -@RequiresApi(Build.VERSION_CODES.O) +@SdkSuppress(minSdkVersion = Build.VERSION_CODES.O) fun assertScreenshotMatchesGolden( goldenName: String, node: SemanticsNodeInteraction