From c6c2b260f169ba77006c22c7f9d59467d5dbc6dd Mon Sep 17 00:00:00 2001 From: Isira Seneviratne Date: Sat, 1 Apr 2023 09:23:17 +0530 Subject: [PATCH] Add NewApi suppressions. --- app/src/main/java/com/github/libretube/helpers/DownloadHelper.kt | 1 + .../main/java/com/github/libretube/services/DownloadService.kt | 1 + 2 files changed, 2 insertions(+) diff --git a/app/src/main/java/com/github/libretube/helpers/DownloadHelper.kt b/app/src/main/java/com/github/libretube/helpers/DownloadHelper.kt index 211455a86..3d062eca3 100644 --- a/app/src/main/java/com/github/libretube/helpers/DownloadHelper.kt +++ b/app/src/main/java/com/github/libretube/helpers/DownloadHelper.kt @@ -35,6 +35,7 @@ object DownloadHelper { } fun getDownloadDir(context: Context, path: String): Path { + @Suppress("NewApi") // The Path class is desugared. return getOfflineStorageDir(context).resolve(path).createDirectories() } diff --git a/app/src/main/java/com/github/libretube/services/DownloadService.kt b/app/src/main/java/com/github/libretube/services/DownloadService.kt index 144a4b04e..5c9a317b0 100644 --- a/app/src/main/java/com/github/libretube/services/DownloadService.kt +++ b/app/src/main/java/com/github/libretube/services/DownloadService.kt @@ -442,6 +442,7 @@ class DownloadService : LifecycleService() { * Get a [File] from the corresponding download directory and the file name */ private fun getDownloadPath(directory: String, fileName: String): Path { + @Suppress("NewApi") // The Path class is desugared. return DownloadHelper.getDownloadDir(this, directory).resolve(fileName) }