mirror of
https://github.com/revanced/revanced-patcher.git
synced 2025-05-01 05:44:24 +02:00
feat!: add classDef
parameter to MethodFingerprint
(#175)
BREAKING CHANGE: This changes the signature of the `customFingerprint` function.
This commit is contained in:
parent
223cea7021
commit
a2052202b2
@ -31,7 +31,7 @@ abstract class MethodFingerprint(
|
|||||||
internal val parameters: Iterable<String>? = null,
|
internal val parameters: Iterable<String>? = null,
|
||||||
internal val opcodes: Iterable<Opcode?>? = null,
|
internal val opcodes: Iterable<Opcode?>? = null,
|
||||||
internal val strings: Iterable<String>? = null,
|
internal val strings: Iterable<String>? = null,
|
||||||
internal val customFingerprint: ((methodDef: Method) -> Boolean)? = null
|
internal val customFingerprint: ((methodDef: Method, classDef: ClassDef) -> Boolean)? = null
|
||||||
) : Fingerprint {
|
) : Fingerprint {
|
||||||
/**
|
/**
|
||||||
* The result of the [MethodFingerprint] the [Method].
|
* The result of the [MethodFingerprint] the [Method].
|
||||||
@ -94,7 +94,7 @@ abstract class MethodFingerprint(
|
|||||||
) return false
|
) return false
|
||||||
|
|
||||||
@Suppress("UNNECESSARY_NOT_NULL_ASSERTION")
|
@Suppress("UNNECESSARY_NOT_NULL_ASSERTION")
|
||||||
if (methodFingerprint.customFingerprint != null && !methodFingerprint.customFingerprint!!(method))
|
if (methodFingerprint.customFingerprint != null && !methodFingerprint.customFingerprint!!(method, forClass))
|
||||||
return false
|
return false
|
||||||
|
|
||||||
val stringsScanResult: StringsScanResult? =
|
val stringsScanResult: StringsScanResult? =
|
||||||
|
Loading…
x
Reference in New Issue
Block a user