From d42fbb152126cf2177315c4706fb03bc89f5af1c Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Tue, 21 May 2024 03:36:32 +0200 Subject: [PATCH] fix: Use UrlDecoder API available in older Android versions --- .../patches/shared/misc/integrations/BaseIntegrationsPatch.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/app/revanced/patches/shared/misc/integrations/BaseIntegrationsPatch.kt b/src/main/kotlin/app/revanced/patches/shared/misc/integrations/BaseIntegrationsPatch.kt index 0178ed5a..bd371c4a 100644 --- a/src/main/kotlin/app/revanced/patches/shared/misc/integrations/BaseIntegrationsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/shared/misc/integrations/BaseIntegrationsPatch.kt @@ -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.")