This commit is contained in:
kunfei 2023-05-21 20:54:42 +08:00
parent 54171e5a4c
commit 96ef9571e1
14 changed files with 1 additions and 18 deletions

View File

@ -1,17 +0,0 @@
package io.legado.app.help
import androidx.annotation.Keep
import io.legado.app.utils.IntentType
@Keep
@Suppress("unused")
object AppIntentType : IntentType.TypeInterface {
override fun from(path: String?): String? {
return when (path?.substringAfterLast(".")?.lowercase()) {
"apk" -> "application/vnd.android.package-archive"
else -> null
}
}
}

View File

@ -4,7 +4,6 @@ import android.os.Build
import androidx.annotation.Keep
import io.legado.app.utils.printOnDebug
import okhttp3.*
import okhttp3.internal.http.receiveHeaders
import java.io.IOException
@Keep

View File

@ -25,6 +25,7 @@ object IntentType {
"3gp", "mp4" -> "audio/*"
"jpg", "gif", "png", "jpeg", "bmp" -> "image/*"
"", "txt", "json", "log" -> "text/plain"
"apk" -> "application/vnd.android.package-archive"
else -> appIntentType?.from(path) ?: "*/*"
}
}