forked from inotia00/revanced-patches
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(youtube/bypass-ambient-mode-restrictions): update fingerprint
- Loading branch information
1 parent
88d6389
commit 6087d7b
Showing
2 changed files
with
35 additions
and
3 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
...nced/patches/youtube/misc/ambientmode/fingerprints/PowerSaveModeAlternativeFingerprint.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package app.revanced.patches.youtube.misc.ambientmode.fingerprints | ||
|
||
import app.revanced.patcher.extensions.or | ||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint | ||
import app.revanced.util.bytecode.isNarrowLiteralExists | ||
import com.android.tools.smali.dexlib2.AccessFlags | ||
import com.android.tools.smali.dexlib2.Opcode | ||
|
||
object PowerSaveModeAlternativeFingerprint : MethodFingerprint( | ||
returnType = "V", | ||
accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL, | ||
parameters = listOf("Ljava/lang/Object;"), | ||
opcodes = listOf( | ||
Opcode.IF_GT, | ||
Opcode.IGET, | ||
Opcode.ADD_INT_2ADDR | ||
), | ||
customFingerprint = { methodDef, _ -> | ||
methodDef.isNarrowLiteralExists(107243) && methodDef.isNarrowLiteralExists( | ||
140796 | ||
) && methodDef.name == "accept" | ||
} | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters