mirror of
https://github.com/revanced/revanced-patches
synced 2025-02-09 07:56:51 +01:00
refactor: use method to add instructions without labels (#2518)
This commit is contained in:
parent
eb69a8813f
commit
e9fb849d5f
@ -4,7 +4,7 @@ import app.revanced.patcher.annotation.Description
|
|||||||
import app.revanced.patcher.annotation.Name
|
import app.revanced.patcher.annotation.Name
|
||||||
import app.revanced.patcher.annotation.Version
|
import app.revanced.patcher.annotation.Version
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
import app.revanced.patcher.patch.PatchResult
|
import app.revanced.patcher.patch.PatchResult
|
||||||
import app.revanced.patcher.patch.PatchResultSuccess
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
@ -21,7 +21,7 @@ class RemoveDebuggingDetectionPatch : BytecodePatch(
|
|||||||
listOf(DebuggingDetectionFingerprint)
|
listOf(DebuggingDetectionFingerprint)
|
||||||
) {
|
) {
|
||||||
override fun execute(context: BytecodeContext): PatchResult {
|
override fun execute(context: BytecodeContext): PatchResult {
|
||||||
DebuggingDetectionFingerprint.result!!.mutableMethod.addInstructionsWithLabels(
|
DebuggingDetectionFingerprint.result!!.mutableMethod.addInstructions(
|
||||||
0,
|
0,
|
||||||
"""
|
"""
|
||||||
const/4 v0, 0x0
|
const/4 v0, 0x0
|
||||||
|
@ -3,7 +3,7 @@ package app.revanced.patches.vsco.misc.pro.patch
|
|||||||
import app.revanced.extensions.toErrorResult
|
import app.revanced.extensions.toErrorResult
|
||||||
import app.revanced.patcher.annotation.*
|
import app.revanced.patcher.annotation.*
|
||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructionsWithLabels
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
import app.revanced.patcher.patch.PatchResult
|
import app.revanced.patcher.patch.PatchResult
|
||||||
import app.revanced.patcher.patch.PatchResultSuccess
|
import app.revanced.patcher.patch.PatchResultSuccess
|
||||||
@ -22,7 +22,7 @@ class UnlockProPatch : BytecodePatch(
|
|||||||
override fun execute(context: BytecodeContext): PatchResult {
|
override fun execute(context: BytecodeContext): PatchResult {
|
||||||
RevCatSubscriptionFingerprint.result?.mutableMethod?.apply {
|
RevCatSubscriptionFingerprint.result?.mutableMethod?.apply {
|
||||||
// Set isSubscribed to true.
|
// Set isSubscribed to true.
|
||||||
addInstructionsWithLabels(
|
addInstruction(
|
||||||
0,
|
0,
|
||||||
"""
|
"""
|
||||||
const p1, 0x1
|
const p1, 0x1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user