mirror of
https://github.com/ReVanced/revanced-patches.git
synced 2024-11-10 01:01:56 +01:00
fix: Use UrlDecoder API available in older Android versions
This commit is contained in:
parent
e5967ada0f
commit
d42fbb1521
1 changed files with 2 additions and 2 deletions
|
@ -14,7 +14,6 @@ import com.android.tools.smali.dexlib2.Opcode
|
|||
import com.android.tools.smali.dexlib2.iface.ClassDef
|
||||
import com.android.tools.smali.dexlib2.iface.Method
|
||||
import java.net.URLDecoder
|
||||
import java.nio.charset.StandardCharsets
|
||||
import java.util.jar.JarFile
|
||||
|
||||
abstract class BaseIntegrationsPatch(
|
||||
|
@ -77,7 +76,8 @@ abstract class BaseIntegrationsPatch(
|
|||
|
||||
if (urlString.startsWith("jar:file:")) {
|
||||
val end = urlString.lastIndexOf('!')
|
||||
return URLDecoder.decode(urlString.substring("jar:file:".length, end), StandardCharsets.UTF_8)
|
||||
|
||||
return URLDecoder.decode(urlString.substring("jar:file:".length, end), "UTF-8")
|
||||
}
|
||||
}
|
||||
throw IllegalStateException("Not running from inside a JAR file.")
|
||||
|
|
Loading…
Reference in a new issue