|
@@ -1,21 +1,20 @@
|
|
|
-package io.legado.app.utils
|
|
|
|
|
|
|
+package io.legado.app.help
|
|
|
|
|
|
|
|
import android.net.Uri
|
|
import android.net.Uri
|
|
|
|
|
+import androidx.annotation.Keep
|
|
|
import java.io.File
|
|
import java.io.File
|
|
|
|
|
|
|
|
|
|
+@Keep
|
|
|
object IntentType {
|
|
object IntentType {
|
|
|
|
|
|
|
|
- @JvmStatic
|
|
|
|
|
fun from(uri: Uri): String? {
|
|
fun from(uri: Uri): String? {
|
|
|
return from(uri.toString())
|
|
return from(uri.toString())
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- @JvmStatic
|
|
|
|
|
fun from(file: File): String? {
|
|
fun from(file: File): String? {
|
|
|
return from(file.absolutePath)
|
|
return from(file.absolutePath)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- @JvmStatic
|
|
|
|
|
fun from(path: String?): String? {
|
|
fun from(path: String?): String? {
|
|
|
return when (path?.substringAfterLast(".")?.lowercase()) {
|
|
return when (path?.substringAfterLast(".")?.lowercase()) {
|
|
|
"apk" -> "application/vnd.android.package-archive"
|
|
"apk" -> "application/vnd.android.package-archive"
|