forked from ReVanced/revanced-patches
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(YouTube - Restore old video quality menu): Show advanced quality …
…menu in Shorts quality flyout (ReVanced#3155) Co-authored-by: oSumAtrIX <[email protected]>
- Loading branch information
1 parent
d3b8733
commit c2b5bb7
Showing
3 changed files
with
58 additions
and
2 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
22 changes: 22 additions & 0 deletions
22
...patches/youtube/video/videoqualitymenu/fingerprints/VideoQualityMenuOptionsFingerprint.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,22 @@ | ||
package app.revanced.patches.youtube.video.videoqualitymenu.fingerprints | ||
|
||
import app.revanced.patches.youtube.video.videoqualitymenu.RestoreOldVideoQualityMenuResourcePatch | ||
import app.revanced.util.patch.LiteralValueFingerprint | ||
import com.android.tools.smali.dexlib2.AccessFlags | ||
import com.android.tools.smali.dexlib2.Opcode | ||
|
||
internal object VideoQualityMenuOptionsFingerprint : LiteralValueFingerprint( | ||
accessFlags = AccessFlags.STATIC.value, | ||
parameters = listOf("Landroid/content/Context", "L", "L"), | ||
returnType = "[L", | ||
opcodes = listOf( | ||
Opcode.IF_EQZ, // Check if advanced menu should be shown. | ||
Opcode.NEW_ARRAY, | ||
Opcode.APUT_OBJECT, | ||
Opcode.APUT_OBJECT, | ||
Opcode.APUT_OBJECT, | ||
Opcode.RETURN_OBJECT, | ||
Opcode.CONST_4 // Advanced menu code path. | ||
), | ||
literalSupplier = { RestoreOldVideoQualityMenuResourcePatch.videoQualityQuickMenuAdvancedMenuDescription } | ||
) |