mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-29 00:10:32 +05:30
Remove unnecessary NewApi suppressions.
This commit is contained in:
parent
cf179fd7e9
commit
a080526087
@ -35,7 +35,6 @@ data class Streams(
|
||||
val uploaderSubscriberCount: Long = 0,
|
||||
val previewFrames: List<PreviewFrames> = emptyList()
|
||||
) {
|
||||
@Suppress("NewApi") // The Paths class is desugared.
|
||||
fun toDownloadItems(
|
||||
videoId: String,
|
||||
fileName: String,
|
||||
|
@ -10,6 +10,5 @@ fun Path.toAndroidUriOrNull(): Uri? {
|
||||
}
|
||||
|
||||
fun Path.toAndroidUri(): Uri {
|
||||
@Suppress("NewApi") // The Path class is desugared.
|
||||
return toFile().toUri()
|
||||
}
|
||||
|
@ -35,7 +35,6 @@ object DownloadHelper {
|
||||
}
|
||||
|
||||
fun getDownloadDir(context: Context, path: String): Path {
|
||||
@Suppress("NewApi") // The Path class is desugared.
|
||||
return getOfflineStorageDir(context).resolve(path).createDirectories()
|
||||
}
|
||||
|
||||
|
@ -440,7 +440,6 @@ 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)
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user