mirror of
https://github.com/Aviortheking/Neo-Store.git
synced 2025-04-23 19:32:16 +00:00
Remove unused functions
This commit is contained in:
parent
e7184ecccc
commit
b3a98ee093
@ -3,7 +3,6 @@ package com.looker.droidify.content
|
||||
import android.content.ContentProvider
|
||||
import android.content.ContentValues
|
||||
import android.content.Context
|
||||
import android.content.pm.PackageManager
|
||||
import android.database.Cursor
|
||||
import android.database.MatrixCursor
|
||||
import android.net.Uri
|
||||
@ -31,13 +30,6 @@ object Cache {
|
||||
}
|
||||
}
|
||||
|
||||
private fun subPath(dir: File, file: File): String {
|
||||
val dirPath = "${dir.path}/"
|
||||
val filePath = file.path
|
||||
filePath.startsWith(dirPath) || throw RuntimeException()
|
||||
return filePath.substring(dirPath.length)
|
||||
}
|
||||
|
||||
fun getImagesDir(context: Context): File {
|
||||
return ensureCacheDir(context, "images")
|
||||
}
|
||||
@ -61,16 +53,6 @@ object Cache {
|
||||
}
|
||||
}
|
||||
|
||||
fun getReleaseUri(context: Context, cacheFileName: String): Uri {
|
||||
val file = getReleaseFile(context, cacheFileName)
|
||||
val packageInfo =
|
||||
context.packageManager.getPackageInfo(context.packageName, PackageManager.GET_PROVIDERS)
|
||||
val authority =
|
||||
packageInfo.providers.find { it.name == Provider::class.java.name }!!.authority
|
||||
return Uri.Builder().scheme("content").authority(authority)
|
||||
.encodedPath(subPath(context.cacheDir, file)).build()
|
||||
}
|
||||
|
||||
fun getTemporaryFile(context: Context): File {
|
||||
return File(ensureCacheDir(context, "temporary"), UUID.randomUUID().toString())
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user