mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-05-02 23:54:33 +02:00
feat(YouTube Music): Add support version 8.10.51
This commit is contained in:
parent
9f762e8bd0
commit
35b63f3fb8
@ -41,6 +41,7 @@ val cairoSplashAnimationPatch = bytecodePatch(
|
|||||||
"7.16.53",
|
"7.16.53",
|
||||||
"7.25.53",
|
"7.25.53",
|
||||||
"8.05.51",
|
"8.05.51",
|
||||||
|
"8.10.51",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -20,8 +20,8 @@ import app.revanced.util.or
|
|||||||
import com.android.tools.smali.dexlib2.AccessFlags
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
import com.android.tools.smali.dexlib2.iface.Method
|
import com.android.tools.smali.dexlib2.iface.Method
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
|
|
||||||
import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
||||||
|
import com.android.tools.smali.dexlib2.iface.reference.TypeReference
|
||||||
|
|
||||||
const val AUDIO_VIDEO_SWITCH_TOGGLE_VISIBILITY =
|
const val AUDIO_VIDEO_SWITCH_TOGGLE_VISIBILITY =
|
||||||
"/AudioVideoSwitcherToggleView;->setVisibility(I)V"
|
"/AudioVideoSwitcherToggleView;->setVisibility(I)V"
|
||||||
@ -44,7 +44,6 @@ internal val audioVideoSwitchToggleFingerprint = legacyFingerprint(
|
|||||||
internal val engagementPanelHeightFingerprint = legacyFingerprint(
|
internal val engagementPanelHeightFingerprint = legacyFingerprint(
|
||||||
name = "engagementPanelHeightFingerprint",
|
name = "engagementPanelHeightFingerprint",
|
||||||
returnType = "L",
|
returnType = "L",
|
||||||
accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL,
|
|
||||||
// In YouTube Music 7.21.50+, there are two methods with similar structure, so this Opcode pattern must be used.
|
// In YouTube Music 7.21.50+, there are two methods with similar structure, so this Opcode pattern must be used.
|
||||||
opcodes = listOf(
|
opcodes = listOf(
|
||||||
Opcode.IGET_OBJECT,
|
Opcode.IGET_OBJECT,
|
||||||
@ -54,6 +53,7 @@ internal val engagementPanelHeightFingerprint = legacyFingerprint(
|
|||||||
),
|
),
|
||||||
parameters = emptyList(),
|
parameters = emptyList(),
|
||||||
customFingerprint = { method, _ ->
|
customFingerprint = { method, _ ->
|
||||||
|
AccessFlags.FINAL.isSet(method.accessFlags) &&
|
||||||
method.containsLiteralInstruction(1) &&
|
method.containsLiteralInstruction(1) &&
|
||||||
method.indexOfFirstInstruction {
|
method.indexOfFirstInstruction {
|
||||||
opcode == Opcode.INVOKE_VIRTUAL &&
|
opcode == Opcode.INVOKE_VIRTUAL &&
|
||||||
@ -65,7 +65,6 @@ internal val engagementPanelHeightFingerprint = legacyFingerprint(
|
|||||||
internal val engagementPanelHeightParentFingerprint = legacyFingerprint(
|
internal val engagementPanelHeightParentFingerprint = legacyFingerprint(
|
||||||
name = "engagementPanelHeightParentFingerprint",
|
name = "engagementPanelHeightParentFingerprint",
|
||||||
returnType = "L",
|
returnType = "L",
|
||||||
accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL,
|
|
||||||
opcodes = listOf(Opcode.NEW_ARRAY),
|
opcodes = listOf(Opcode.NEW_ARRAY),
|
||||||
parameters = emptyList(),
|
parameters = emptyList(),
|
||||||
customFingerprint = custom@{ method, _ ->
|
customFingerprint = custom@{ method, _ ->
|
||||||
@ -75,9 +74,12 @@ internal val engagementPanelHeightParentFingerprint = legacyFingerprint(
|
|||||||
if (method.returnType == "Ljava/lang/Object;") {
|
if (method.returnType == "Ljava/lang/Object;") {
|
||||||
return@custom false
|
return@custom false
|
||||||
}
|
}
|
||||||
|
if (!AccessFlags.FINAL.isSet(method.accessFlags)) {
|
||||||
|
return@custom false
|
||||||
|
}
|
||||||
method.indexOfFirstInstruction {
|
method.indexOfFirstInstruction {
|
||||||
opcode == Opcode.CHECK_CAST &&
|
opcode == Opcode.CHECK_CAST &&
|
||||||
(this as? ReferenceInstruction)?.reference?.toString() == "Lcom/google/android/libraries/youtube/engagementpanel/size/EngagementPanelSizeBehavior;"
|
getReference<TypeReference>()?.type == "Lcom/google/android/libraries/youtube/engagementpanel/size/EngagementPanelSizeBehavior;"
|
||||||
} >= 0
|
} >= 0
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
@ -15,7 +15,8 @@ internal object Constants {
|
|||||||
"6.51.53", // This is the latest version of YouTube Music 6.xx.xx
|
"6.51.53", // This is the latest version of YouTube Music 6.xx.xx
|
||||||
"7.16.53", // This is the latest version that supports the 'Spoof app version' patch.
|
"7.16.53", // This is the latest version that supports the 'Spoof app version' patch.
|
||||||
"7.25.53", // This is the last supported version for 2024.
|
"7.25.53", // This is the last supported version for 2024.
|
||||||
"8.05.51", // This is the latest version supported by the RVX patch.
|
"8.05.51", // This was the latest version supported by the previous RVX patch.
|
||||||
|
"8.10.51", // This is the latest version supported by the RVX patch.
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user