Pupil-24 Absence of backing up favorites feature

This commit is contained in:
tom5079
2019-12-01 16:58:29 +09:00
parent 8d16950f46
commit f98f45dc54
10 changed files with 154 additions and 9 deletions

View File

@@ -33,9 +33,9 @@ fun getCachedGallery(context: Context, galleryID: Int): File {
}
@Suppress("DEPRECATION")
fun getDownloadDirectory(context: Context): File? {
fun getDownloadDirectory(context: Context): File {
return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q)
context.getExternalFilesDir("Pupil")
context.getExternalFilesDir("Pupil")!!
else
File(Environment.getExternalStorageDirectory(), "Pupil")
}