mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-05-06 17:44:36 +02:00
fix: CI test code not removed after ReVanced Patcher 21 migration
This commit is contained in:
parent
af9c718638
commit
2561fd2922
@ -33,18 +33,15 @@ class ExtensionHook internal constructor(
|
|||||||
private val insertIndexResolver: ((Method) -> Int),
|
private val insertIndexResolver: ((Method) -> Int),
|
||||||
private val contextRegisterResolver: (Method) -> String,
|
private val contextRegisterResolver: (Method) -> String,
|
||||||
) {
|
) {
|
||||||
context(BytecodePatchContext)
|
|
||||||
operator fun invoke(extensionClassDescriptor: String) {
|
operator fun invoke(extensionClassDescriptor: String) {
|
||||||
if (System.getenv("GITHUB_REPOSITORY") == null) {
|
val insertIndex = insertIndexResolver(fingerprint.method)
|
||||||
val insertIndex = insertIndexResolver(fingerprint.method)
|
val contextRegister = contextRegisterResolver(fingerprint.method)
|
||||||
val contextRegister = contextRegisterResolver(fingerprint.method)
|
|
||||||
|
|
||||||
fingerprint.method.addInstruction(
|
fingerprint.method.addInstruction(
|
||||||
insertIndex,
|
insertIndex,
|
||||||
"invoke-static/range { $contextRegister .. $contextRegister }, " +
|
"invoke-static/range { $contextRegister .. $contextRegister }, " +
|
||||||
"$extensionClassDescriptor->setContext(Landroid/content/Context;)V",
|
"$extensionClassDescriptor->setContext(Landroid/content/Context;)V",
|
||||||
)
|
)
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user