fix: callback for each file instead of class

This commit is contained in:
oSumAtrIX 2022-06-23 01:35:26 +02:00
parent 1f4bc5079f
commit 930768dfb3
No known key found for this signature in database
GPG key ID: A9B3094ACDB604B4

View file

@ -128,6 +128,8 @@ class Patcher(private val options: PatcherOptions) {
callback: (File) -> Unit
) {
for (file in files) {
callback(file)
for (classDef in MultiDexIO.readDexFile(true, file, NAMER, null, null).classes) {
val type = classDef.type
@ -138,7 +140,6 @@ class Patcher(private val options: PatcherOptions) {
logger.trace("Merging $type")
data.bytecodeData.classes.internalClasses.add(classDef)
callback(file)
continue
}
@ -150,7 +151,6 @@ class Patcher(private val options: PatcherOptions) {
val index = existingClass.second
data.bytecodeData.classes.internalClasses[index] = classDef
callback(file)
}
}
}