mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-05-20 16:27:17 +02:00
feat(YouTube Music): add support versions 6.50.53
~ 6.51.52
This commit is contained in:
parent
d17215f921
commit
3c16f0fbd1
@ -10,7 +10,8 @@ object Constants {
|
||||
"6.29.58",
|
||||
"6.31.55",
|
||||
"6.33.52",
|
||||
"6.50.51"
|
||||
"6.50.53",
|
||||
"6.51.52"
|
||||
)
|
||||
)
|
||||
)
|
||||
|
@ -1,19 +1,25 @@
|
||||
package app.revanced.patches.music.utils.integrations.fingerprints
|
||||
|
||||
import app.revanced.patches.music.utils.integrations.fingerprints.InitFingerprint.indexOfGetProcessNameInstruction
|
||||
import app.revanced.patches.shared.integrations.BaseIntegrationsPatch.IntegrationsFingerprint
|
||||
import app.revanced.util.getReference
|
||||
import app.revanced.util.indexOfFirstInstruction
|
||||
import com.android.tools.smali.dexlib2.Opcode
|
||||
import com.android.tools.smali.dexlib2.iface.Method
|
||||
import com.android.tools.smali.dexlib2.iface.reference.MethodReference
|
||||
|
||||
internal object InitFingerprint : IntegrationsFingerprint(
|
||||
returnType = "V",
|
||||
parameters = emptyList(),
|
||||
opcodes = listOf(
|
||||
Opcode.NEW_INSTANCE,
|
||||
Opcode.INVOKE_DIRECT,
|
||||
Opcode.INVOKE_STATIC,
|
||||
Opcode.NEW_INSTANCE,
|
||||
Opcode.INVOKE_DIRECT,
|
||||
Opcode.INVOKE_VIRTUAL
|
||||
),
|
||||
strings = listOf("activity"),
|
||||
customFingerprint = { methodDef, _ -> methodDef.name == "onCreate" }
|
||||
)
|
||||
customFingerprint = { methodDef, _ ->
|
||||
methodDef.name == "onCreate"
|
||||
&& indexOfGetProcessNameInstruction(methodDef) >= 0
|
||||
}
|
||||
) {
|
||||
fun indexOfGetProcessNameInstruction(methodDef: Method) =
|
||||
methodDef.indexOfFirstInstruction {
|
||||
opcode == Opcode.INVOKE_STATIC
|
||||
&& getReference<MethodReference>()?.name == "getProcessName"
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user