fix: Downgrade smali to fix dex compilation issue

This commit is contained in:
oSumAtrIX
2024-07-31 01:12:21 +02:00
parent 8c4dd5b3a3
commit 5227e98abf
5 changed files with 13 additions and 5 deletions

View File

@@ -154,7 +154,7 @@ class Patcher(private val config: PatcherConfig) : Closeable {
}
}
override fun close() = context.bytecodeContext.close()
override fun close() = context.close()
/**
* Compile and save patched APK files.

View File

@@ -5,6 +5,7 @@ import app.revanced.patcher.patch.Patch
import app.revanced.patcher.patch.ResourcePatchContext
import brut.androlib.apk.ApkInfo
import brut.directory.ExtFile
import java.io.Closeable
/**
* A context for the patcher containing the current state of the patcher.
@@ -12,7 +13,7 @@ import brut.directory.ExtFile
* @param config The configuration for the patcher.
*/
@Suppress("MemberVisibilityCanBePrivate")
class PatcherContext internal constructor(config: PatcherConfig) {
class PatcherContext internal constructor(config: PatcherConfig): Closeable {
/**
* [PackageMetadata] of the supplied [PatcherConfig.apkFile].
*/
@@ -37,4 +38,6 @@ class PatcherContext internal constructor(config: PatcherConfig) {
* The context for patches containing the current state of the bytecode.
*/
internal val bytecodeContext = BytecodePatchContext(config)
override fun close() = bytecodeContext.close()
}

View File

@@ -192,6 +192,7 @@ internal object PatcherTest {
private operator fun Set<Patch<*>>.invoke(): List<PatchResult> {
every { patcher.context.executablePatches } returns toMutableSet()
every { patcher.context.bytecodeContext.lookupMaps } returns LookupMaps(patcher.context.bytecodeContext.classes)
return runBlocking { patcher().toList() }
}