mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-05-09 11:04:36 +02:00
23 lines
903 B
Kotlin
23 lines
903 B
Kotlin
package app.revanced.patches.shared.fingerprints
|
|
|
|
import app.revanced.patcher.extensions.or
|
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
|
import app.revanced.patches.youtube.misc.resourceid.patch.SharedResourceIdPatch
|
|
import org.jf.dexlib2.iface.instruction.WideLiteralInstruction
|
|
import org.jf.dexlib2.AccessFlags
|
|
import org.jf.dexlib2.Opcode
|
|
|
|
object PivotBarCreateButtonViewFingerprint : MethodFingerprint(
|
|
returnType = "V",
|
|
access = AccessFlags.PUBLIC or AccessFlags.FINAL,
|
|
opcodes = listOf(
|
|
Opcode.MOVE_OBJECT,
|
|
Opcode.INVOKE_DIRECT_RANGE, // unique instruction anchor
|
|
),
|
|
customFingerprint = { methodDef ->
|
|
methodDef.implementation?.instructions?.any {
|
|
it.opcode.ordinal == Opcode.CONST.ordinal &&
|
|
(it as? WideLiteralInstruction)?.wideLiteral == SharedResourceIdPatch.imageOnlyTabId
|
|
} == true
|
|
}
|
|
) |