refactor: migrate to changes from ReVanced Patcher
This commit is contained in:
@ -4,5 +4,5 @@ package app.revanced.patches.shared.fingerprints
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
|
||||
object SeekbarOnDrawFingerprint : MethodFingerprint(
|
||||
customFingerprint = { it.name == "onDraw" }
|
||||
customFingerprint = { methodDef, _ -> methodDef.name == "onDraw" }
|
||||
)
|
@ -4,7 +4,7 @@ package app.revanced.patches.shared.fingerprints
|
||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||
|
||||
object WatchWhileActivityFingerprint : MethodFingerprint(
|
||||
customFingerprint = { methodDef ->
|
||||
customFingerprint = { methodDef, _ ->
|
||||
methodDef.definingClass.endsWith("WatchWhileActivity;") && methodDef.name == "<init>"
|
||||
}
|
||||
)
|
||||
|
@ -10,6 +10,7 @@ import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultError
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import org.jf.dexlib2.Opcode
|
||||
import org.jf.dexlib2.iface.ClassDef
|
||||
import org.jf.dexlib2.iface.Method
|
||||
|
||||
@Description("Applies mandatory patches to implement the ReVanced integrations into the application.")
|
||||
@ -30,7 +31,7 @@ abstract class AbstractIntegrationsPatch(
|
||||
parameters: Iterable<String>? = null,
|
||||
opcodes: Iterable<Opcode?>? = null,
|
||||
strings: Iterable<String>? = null,
|
||||
customFingerprint: ((methodDef: Method) -> Boolean)? = null,
|
||||
customFingerprint: ((methodDef: Method, classDef: ClassDef) -> Boolean)? = null,
|
||||
private val contextRegisterResolver: (Method) -> Int = object : RegisterResolver {}
|
||||
) : MethodFingerprint(
|
||||
returnType,
|
||||
|
@ -13,5 +13,5 @@ object CanScrollVerticallyFingerprint : MethodFingerprint(
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
Opcode.MOVE_RESULT,
|
||||
),
|
||||
customFingerprint = { methodDef -> methodDef.definingClass.endsWith("SwipeRefreshLayout;") }
|
||||
customFingerprint = { methodDef, _ -> methodDef.definingClass.endsWith("SwipeRefreshLayout;") }
|
||||
)
|
||||
|
Reference in New Issue
Block a user