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) } } )