mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-06-12 13:17:46 +02:00
feat(YouTube Music): add support version 6.20.51
(#81)
* feat(YouTube Music): add support version `6.20.51` * feat: apply code review suggestions --------- Co-authored-by: inotia00 <108592928+inotia00@users.noreply.github.com>
This commit is contained in:
@ -1,17 +1,28 @@
|
||||
package app.revanced.patches.music.ads.general.fingerprints
|
||||
|
||||
import app.revanced.patcher.fingerprint.MethodFingerprint
|
||||
import app.revanced.patches.music.utils.resourceid.SharedResourceIdPatch.SlidingDialogAnimation
|
||||
import app.revanced.util.fingerprint.LiteralValueFingerprint
|
||||
import app.revanced.util.containsWideLiteralInstructionIndex
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
|
||||
internal object ShowDialogCommandFingerprint : LiteralValueFingerprint(
|
||||
internal object ShowDialogCommandFingerprint : MethodFingerprint(
|
||||
returnType = "V",
|
||||
parameters = listOf("[B", "L"),
|
||||
opcodes = listOf(
|
||||
Opcode.IF_EQ,
|
||||
Opcode.IGET_OBJECT,
|
||||
Opcode.INVOKE_VIRTUAL,
|
||||
Opcode.IGET, // get dialog code
|
||||
),
|
||||
literalSupplier = { SlidingDialogAnimation }
|
||||
// 6.26 and earlier has a different first parameter.
|
||||
// Since this fingerprint is somewhat weak, work around by checking for both method parameter signatures.
|
||||
customFingerprint = custom@{ methodDef, _ ->
|
||||
if (!methodDef.containsWideLiteralInstructionIndex(SlidingDialogAnimation)) {
|
||||
return@custom false
|
||||
}
|
||||
// 6.26 and earlier parameters are: "L", "L"
|
||||
// 6.27+ parameters are "[B", "L"
|
||||
val parameterTypes = methodDef.parameterTypes
|
||||
|
||||
parameterTypes.size == 2 && parameterTypes[1].startsWith("L")
|
||||
},
|
||||
)
|
@ -7,6 +7,7 @@ object Constants {
|
||||
Patch.CompatiblePackage(
|
||||
"com.google.android.apps.youtube.music",
|
||||
setOf(
|
||||
"6.20.51", // This is the latest version that supports Android 5.0
|
||||
"6.29.58", // This is the latest version that supports the 'Restore old player layout' setting.
|
||||
"6.33.52", // This is the latest version with the legacy code of YouTube Music.
|
||||
"6.42.55", // This is the latest version that supports Android 7.0
|
||||
|
Reference in New Issue
Block a user