Skip to content

Commit

Permalink
fix: Use UrlDecoder API available in older Android versions
Browse files Browse the repository at this point in the history
  • Loading branch information
taku-nm authored May 22, 2024
1 parent e6671ba commit d9e6374
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import com.android.tools.smali.dexlib2.iface.ClassDef
import com.android.tools.smali.dexlib2.iface.Method
import crimera.patches.twitter.misc.integrations.fingerprints.ReVancedUtilsPatchesVersionFingerprint
import java.net.URLDecoder
import java.nio.charset.StandardCharsets
import java.util.jar.JarFile

abstract class BaseIntegrationsPatch(
Expand Down Expand Up @@ -71,7 +70,7 @@ abstract class BaseIntegrationsPatch(

if (urlString.startsWith("jar:file:")) {
val end = urlString.indexOf('!')
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.")
Expand Down

0 comments on commit d9e6374

Please sign in to comment.