mirror of
https://github.com/Shabinder/SpotiFlyer.git
synced 2024-12-22 20:57:54 +01:00
Code Cleanup
This commit is contained in:
parent
6d6a73c713
commit
0c67474be5
@ -1,8 +0,0 @@
|
||||
package com.shabinder.common.models
|
||||
|
||||
import com.github.k1rakishou.fsaf.file.AbstractFile
|
||||
|
||||
// Use Storage Access Framework `SAF`
|
||||
actual data class File(
|
||||
val documentFile: AbstractFile?
|
||||
)
|
@ -1,18 +0,0 @@
|
||||
package com.shabinder.common.models
|
||||
|
||||
import android.net.Uri
|
||||
import com.github.k1rakishou.fsaf.manager.base_directory.BaseDirectory
|
||||
import java.io.File
|
||||
|
||||
class SpotiFlyerBaseDir(
|
||||
private val getDirType: ()-> ActiveBaseDirType,
|
||||
private val getJavaFile: ()-> File?,
|
||||
private val getSAFUri: ()-> Uri?
|
||||
): BaseDirectory() {
|
||||
|
||||
override fun currentActiveBaseDirType(): ActiveBaseDirType = getDirType()
|
||||
|
||||
override fun getDirFile(): File? = getJavaFile()
|
||||
|
||||
override fun getDirUri(): Uri? = getSAFUri()
|
||||
}
|
@ -1,3 +0,0 @@
|
||||
package com.shabinder.common.models
|
||||
|
||||
expect class File
|
@ -1,3 +0,0 @@
|
||||
package com.shabinder.common.models
|
||||
|
||||
actual typealias File = java.io.File
|
@ -1,5 +0,0 @@
|
||||
package com.shabinder.common.models
|
||||
|
||||
actual data class File(
|
||||
val path: String
|
||||
)
|
@ -1,5 +0,0 @@
|
||||
package com.shabinder.common.models
|
||||
|
||||
actual data class File(
|
||||
val path: String
|
||||
)
|
@ -288,8 +288,8 @@ class ForegroundService : Service(), CoroutineScope {
|
||||
messageList = mutableListOf("Cleaning And Exiting", "", "", "", "")
|
||||
downloadService.close()
|
||||
updateNotification()
|
||||
dir.defaultDir().documentFile?.let { cleanFiles(it,dir.fileManager,logger) }
|
||||
cleanFiles(File(dir.imageCachePath + "Tracks/"),logger)
|
||||
cleanFiles(File(dir.defaultDir()),logger)
|
||||
// TODO cleanFiles(File(dir.imageCacheDir()))
|
||||
messageList = mutableListOf("", "", "", "", "")
|
||||
releaseWakeLock()
|
||||
serviceJob.cancel()
|
||||
|
Loading…
Reference in New Issue
Block a user