mirror of
https://github.com/ReVanced/revanced-patcher.git
synced 2026-01-19 09:23:56 +00:00
fix: replaceWith not replacing classes with used class proxies
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
This commit is contained in:
@@ -70,12 +70,13 @@ class Patcher(
|
|||||||
fun save(): Map<String, MemoryDataStore> {
|
fun save(): Map<String, MemoryDataStore> {
|
||||||
val newDexFile = object : DexFile {
|
val newDexFile = object : DexFile {
|
||||||
private fun MutableList<ClassDef>.replaceWith(proxy: ClassProxy) {
|
private fun MutableList<ClassDef>.replaceWith(proxy: ClassProxy) {
|
||||||
if (proxy.proxyUsed) return
|
|
||||||
this[proxy.originalIndex] = proxy.mutatedClass
|
this[proxy.originalIndex] = proxy.mutatedClass
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getClasses(): Set<ClassDef> {
|
override fun getClasses(): Set<ClassDef> {
|
||||||
for (proxy in patcherData.classProxies) {
|
for (proxy in patcherData.classProxies) {
|
||||||
|
if (!proxy.proxyUsed) continue
|
||||||
|
|
||||||
patcherData.classes.replaceWith(proxy)
|
patcherData.classes.replaceWith(proxy)
|
||||||
}
|
}
|
||||||
for (patch in patcherData.patches) {
|
for (patch in patcherData.patches) {
|
||||||
|
|||||||
Reference in New Issue
Block a user