feat(YT Music): Add support for 7.01.52 (#3177)

This commit is contained in:
LisoUseInAIKyrios 2024-05-16 21:12:04 +04:00 committed by GitHub
parent 8035039247
commit e9bfb25dfe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 10 deletions

View File

@ -1,19 +1,10 @@
package app.revanced.patches.music.misc.integrations.fingerprints
import app.revanced.patches.shared.misc.integrations.BaseIntegrationsPatch.IntegrationsFingerprint
import com.android.tools.smali.dexlib2.Opcode
internal object ApplicationInitFingerprint : IntegrationsFingerprint(
returnType = "V",
parameters = emptyList(),
opcodes = listOf(
Opcode.NEW_INSTANCE,
Opcode.INVOKE_DIRECT,
Opcode.INVOKE_STATIC,
Opcode.NEW_INSTANCE,
Opcode.INVOKE_DIRECT,
Opcode.INVOKE_VIRTUAL
),
strings = listOf("activity"),
customFingerprint = { methodDef, _ -> methodDef.name == "onCreate" },
)

View File

@ -8,6 +8,7 @@ import app.revanced.patcher.patch.BytecodePatch
import app.revanced.patcher.patch.PatchException
import app.revanced.patches.shared.misc.integrations.BaseIntegrationsPatch.IntegrationsFingerprint.IRegisterResolver
import app.revanced.patches.shared.misc.integrations.fingerprints.ReVancedUtilsPatchesVersionFingerprint
import app.revanced.util.exception
import app.revanced.util.resultOrThrow
import com.android.tools.smali.dexlib2.Opcode
import com.android.tools.smali.dexlib2.iface.ClassDef
@ -139,7 +140,7 @@ abstract class BaseIntegrationsPatch(
"invoke-static/range { v$contextRegister .. v$contextRegister }, " +
"$integrationsDescriptor->setContext(Landroid/content/Context;)V",
)
} ?: throw PatchException("Could not find hook target fingerprint.")
} ?: throw this.exception
}
interface IHookInsertIndexResolver : (Method) -> Int {