From 8d8565ca6359732faeba2fb3a7223870917d8378 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Mon, 15 Nov 2021 21:37:51 +0100 Subject: [PATCH] Quick fix on this file --- .../java/im/vector/app/espresso/tools/ScreenshotFailureRule.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vector/src/androidTest/java/im/vector/app/espresso/tools/ScreenshotFailureRule.kt b/vector/src/androidTest/java/im/vector/app/espresso/tools/ScreenshotFailureRule.kt index 97217c217b..2e329ebb6b 100644 --- a/vector/src/androidTest/java/im/vector/app/espresso/tools/ScreenshotFailureRule.kt +++ b/vector/src/androidTest/java/im/vector/app/espresso/tools/ScreenshotFailureRule.kt @@ -20,6 +20,7 @@ import android.content.ContentResolver import android.content.ContentValues import android.graphics.Bitmap import android.net.Uri +import android.os.Build import android.os.Environment import android.provider.MediaStore import androidx.test.platform.app.InstrumentationRegistry.getInstrumentation @@ -55,7 +56,7 @@ private fun storeFailureScreenshot(bitmap: Bitmap, screenshotName: String) { put(MediaStore.Images.Media.MIME_TYPE, "image/jpeg") put(MediaStore.Images.Media.DATE_TAKEN, System.currentTimeMillis()) } - if (android.os.Build.VERSION.SDK_INT >= 29) { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) { useMediaStoreScreenshotStorage( contentValues, contentResolver,