From 2561fd2922a19515c820fffd413c263df0882d75 Mon Sep 17 00:00:00 2001 From: inotia00 <108592928+inotia00@users.noreply.github.com> Date: Sun, 22 Dec 2024 16:44:37 +0900 Subject: [PATCH] fix: CI test code not removed after ReVanced Patcher 21 migration --- .../shared/extension/SharedExtensionPatch.kt | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/patches/src/main/kotlin/app/revanced/patches/shared/extension/SharedExtensionPatch.kt b/patches/src/main/kotlin/app/revanced/patches/shared/extension/SharedExtensionPatch.kt index d389463ab..386819fb5 100644 --- a/patches/src/main/kotlin/app/revanced/patches/shared/extension/SharedExtensionPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/shared/extension/SharedExtensionPatch.kt @@ -33,18 +33,15 @@ class ExtensionHook internal constructor( private val insertIndexResolver: ((Method) -> Int), private val contextRegisterResolver: (Method) -> String, ) { - context(BytecodePatchContext) operator fun invoke(extensionClassDescriptor: String) { - if (System.getenv("GITHUB_REPOSITORY") == null) { - val insertIndex = insertIndexResolver(fingerprint.method) - val contextRegister = contextRegisterResolver(fingerprint.method) + val insertIndex = insertIndexResolver(fingerprint.method) + val contextRegister = contextRegisterResolver(fingerprint.method) - fingerprint.method.addInstruction( - insertIndex, - "invoke-static/range { $contextRegister .. $contextRegister }, " + - "$extensionClassDescriptor->setContext(Landroid/content/Context;)V", - ) - } + fingerprint.method.addInstruction( + insertIndex, + "invoke-static/range { $contextRegister .. $contextRegister }, " + + "$extensionClassDescriptor->setContext(Landroid/content/Context;)V", + ) } }