generated from ReVanced/revanced-patches-template
-
-
Notifications
You must be signed in to change notification settings - Fork 267
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(YouTube): Support version
19.03.35
- Loading branch information
1 parent
ba6d1dc
commit aedf487
Showing
3 changed files
with
21 additions
and
7 deletions.
There are no files selected for viewing
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
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
12 changes: 9 additions & 3 deletions
12
...pp/revanced/patches/youtube/layout/hide/shorts/fingerprints/ReelConstructorFingerprint.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 |
---|---|---|
@@ -1,13 +1,19 @@ | ||
package app.revanced.patches.youtube.layout.hide.shorts.fingerprints | ||
|
||
import app.revanced.patcher.extensions.or | ||
import app.revanced.patcher.fingerprint.MethodFingerprint | ||
import app.revanced.patches.youtube.layout.hide.shorts.HideShortsComponentsResourcePatch | ||
import app.revanced.util.patch.LiteralValueFingerprint | ||
import app.revanced.util.containsWideLiteralInstructionValue | ||
import com.android.tools.smali.dexlib2.AccessFlags | ||
import com.android.tools.smali.dexlib2.Opcode | ||
|
||
internal object ReelConstructorFingerprint : LiteralValueFingerprint( | ||
internal object ReelConstructorFingerprint : MethodFingerprint( | ||
accessFlags = AccessFlags.PUBLIC or AccessFlags.CONSTRUCTOR, | ||
opcodes = listOf(Opcode.INVOKE_VIRTUAL), | ||
literalSupplier = { HideShortsComponentsResourcePatch.reelMultipleItemShelfId } | ||
customFingerprint = { methodDef, _ -> | ||
// Cannot use LiteralValueFingerprint, because the resource id may not be present. | ||
val reelMultipleItemShelfId = HideShortsComponentsResourcePatch.reelMultipleItemShelfId; | ||
reelMultipleItemShelfId != -1L | ||
&& methodDef.containsWideLiteralInstructionValue(reelMultipleItemShelfId) | ||
} | ||
) |