Add NewApi suppressions.

This commit is contained in:
Isira Seneviratne 2023-04-01 09:23:17 +05:30
parent 5d6f2ae350
commit c6c2b260f1
2 changed files with 2 additions and 0 deletions

View File

@ -35,6 +35,7 @@ object DownloadHelper {
} }
fun getDownloadDir(context: Context, path: String): Path { fun getDownloadDir(context: Context, path: String): Path {
@Suppress("NewApi") // The Path class is desugared.
return getOfflineStorageDir(context).resolve(path).createDirectories() return getOfflineStorageDir(context).resolve(path).createDirectories()
} }

View File

@ -442,6 +442,7 @@ class DownloadService : LifecycleService() {
* Get a [File] from the corresponding download directory and the file name * Get a [File] from the corresponding download directory and the file name
*/ */
private fun getDownloadPath(directory: String, fileName: String): Path { private fun getDownloadPath(directory: String, fileName: String): Path {
@Suppress("NewApi") // The Path class is desugared.
return DownloadHelper.getDownloadDir(this, directory).resolve(fileName) return DownloadHelper.getDownloadDir(this, directory).resolve(fileName)
} }