mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-05-24 19:02:11 +02:00
28 lines
870 B
Kotlin
28 lines
870 B
Kotlin
package app.revanced.patches.shared.fingerprints
|
|
|
|
import app.revanced.patcher.extensions.or
|
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
|
import org.jf.dexlib2.AccessFlags
|
|
import org.jf.dexlib2.Opcode
|
|
import org.jf.dexlib2.iface.instruction.NarrowLiteralInstruction
|
|
|
|
object LegacyVideoAdsFingerprint : MethodFingerprint(
|
|
returnType = "V",
|
|
access = AccessFlags.PUBLIC or AccessFlags.FINAL,
|
|
parameters = listOf(),
|
|
opcodes = listOf(
|
|
Opcode.CONST_WIDE_16,
|
|
Opcode.IPUT_WIDE,
|
|
Opcode.CONST_WIDE_16,
|
|
Opcode.IPUT_WIDE,
|
|
Opcode.IPUT_WIDE,
|
|
Opcode.IPUT_WIDE,
|
|
Opcode.IPUT_WIDE,
|
|
Opcode.CONST_4,
|
|
),
|
|
customFingerprint = { methodDef ->
|
|
methodDef.implementation!!.instructions.any {
|
|
((it as? NarrowLiteralInstruction)?.narrowLiteral == 4)
|
|
}
|
|
}
|
|
) |