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 uploaderSubscriberCount: Long = 0,
|
||||||
val previewFrames: List<PreviewFrames> = emptyList()
|
val previewFrames: List<PreviewFrames> = emptyList()
|
||||||
) {
|
) {
|
||||||
@Suppress("NewApi") // The Paths class is desugared.
|
|
||||||
fun toDownloadItems(
|
fun toDownloadItems(
|
||||||
videoId: String,
|
videoId: String,
|
||||||
fileName: String,
|
fileName: String,
|
||||||
|
@ -10,6 +10,5 @@ fun Path.toAndroidUriOrNull(): Uri? {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun Path.toAndroidUri(): Uri {
|
fun Path.toAndroidUri(): Uri {
|
||||||
@Suppress("NewApi") // The Path class is desugared.
|
|
||||||
return toFile().toUri()
|
return toFile().toUri()
|
||||||
}
|
}
|
||||||
|
@ -35,7 +35,6 @@ 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()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -440,7 +440,6 @@ 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)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user