mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-05-29 05:10:20 +02:00
build: downgrade dependencies
This commit is contained in:
parent
f5f9485a99
commit
eab33d4bdd
@ -4,6 +4,7 @@ import app.revanced.extensions.exception
|
|||||||
import app.revanced.patcher.data.BytecodeContext
|
import app.revanced.patcher.data.BytecodeContext
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.removeInstructions
|
import app.revanced.patcher.extensions.InstructionExtensions.removeInstructions
|
||||||
|
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
import app.revanced.patcher.patch.annotation.Patch
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
import app.revanced.patches.music.utils.litho.fingerprints.LithoFilterFingerprint
|
import app.revanced.patches.music.utils.litho.fingerprints.LithoFilterFingerprint
|
||||||
@ -29,15 +30,15 @@ object LithoFilterPatch : BytecodePatch(
|
|||||||
|
|
||||||
LithoFilterFingerprint.result?.let {
|
LithoFilterFingerprint.result?.let {
|
||||||
it.mutableMethod.apply {
|
it.mutableMethod.apply {
|
||||||
removeInstructions(0, 6)
|
removeInstructions(2, 4) // Remove dummy filter.
|
||||||
|
|
||||||
addFilter = { classDescriptor ->
|
addFilter = { classDescriptor ->
|
||||||
addInstructions(
|
addInstructions(
|
||||||
0, """
|
0, """
|
||||||
new-instance v0, $classDescriptor
|
new-instance v1, $classDescriptor
|
||||||
invoke-direct {v0}, $classDescriptor-><init>()V
|
invoke-direct {v1}, $classDescriptor-><init>()V
|
||||||
const/16 v3, ${filterCount++}
|
const/16 v2, ${filterCount++}
|
||||||
aput-object v0, v2, v3
|
aput-object v1, v0, v2
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@ -47,11 +48,5 @@ object LithoFilterPatch : BytecodePatch(
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun close() = LithoFilterFingerprint.result!!
|
override fun close() = LithoFilterFingerprint.result!!
|
||||||
.mutableMethod.addInstructions(
|
.mutableMethod.replaceInstruction(0, "const/16 v0, $filterCount")
|
||||||
0, """
|
|
||||||
const/16 v1, $filterCount
|
|
||||||
new-array v2, v1, [$MUSIC_COMPONENTS_PATH/Filter;
|
|
||||||
const/4 v1, 0x1
|
|
||||||
"""
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,7 @@ import com.android.tools.smali.dexlib2.AccessFlags
|
|||||||
|
|
||||||
object LithoFilterFingerprint : MethodFingerprint(
|
object LithoFilterFingerprint : MethodFingerprint(
|
||||||
returnType = "V",
|
returnType = "V",
|
||||||
accessFlags = AccessFlags.STATIC or AccessFlags.CONSTRUCTOR,
|
accessFlags = AccessFlags.PUBLIC or AccessFlags.STATIC or AccessFlags.CONSTRUCTOR,
|
||||||
customFingerprint = { methodDef, _ ->
|
customFingerprint = { methodDef, _ ->
|
||||||
methodDef.definingClass == "Lapp/revanced/music/patches/components/LithoFilterPatch;"
|
methodDef.definingClass == "Lapp/revanced/music/patches/components/LithoFilterPatch;"
|
||||||
}
|
}
|
||||||
|
@ -5,6 +5,7 @@ import app.revanced.patcher.data.BytecodeContext
|
|||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstruction
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
import app.revanced.patcher.extensions.InstructionExtensions.addInstructions
|
||||||
import app.revanced.patcher.extensions.InstructionExtensions.removeInstructions
|
import app.revanced.patcher.extensions.InstructionExtensions.removeInstructions
|
||||||
|
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
|
||||||
import app.revanced.patcher.patch.BytecodePatch
|
import app.revanced.patcher.patch.BytecodePatch
|
||||||
import app.revanced.patcher.patch.annotation.Patch
|
import app.revanced.patcher.patch.annotation.Patch
|
||||||
import app.revanced.patches.shared.patch.litho.ComponentParserPatch
|
import app.revanced.patches.shared.patch.litho.ComponentParserPatch
|
||||||
@ -44,15 +45,15 @@ object LithoFilterPatch : BytecodePatch(
|
|||||||
generalHook("$INTEGRATIONS_CLASS_DESCRIPTOR->filter")
|
generalHook("$INTEGRATIONS_CLASS_DESCRIPTOR->filter")
|
||||||
|
|
||||||
LithoFilterFingerprint.result?.mutableMethod?.apply {
|
LithoFilterFingerprint.result?.mutableMethod?.apply {
|
||||||
removeInstructions(0, 6)
|
removeInstructions(2, 4) // Remove dummy filter.
|
||||||
|
|
||||||
addFilter = { classDescriptor ->
|
addFilter = { classDescriptor ->
|
||||||
addInstructions(
|
addInstructions(
|
||||||
0, """
|
2, """
|
||||||
new-instance v0, $classDescriptor
|
new-instance v1, $classDescriptor
|
||||||
invoke-direct {v0}, $classDescriptor-><init>()V
|
invoke-direct {v1}, $classDescriptor-><init>()V
|
||||||
const/16 v3, ${filterCount++}
|
const/16 v2, ${filterCount++}
|
||||||
aput-object v0, v2, v3
|
aput-object v1, v0, v2
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@ -61,11 +62,5 @@ object LithoFilterPatch : BytecodePatch(
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun close() = LithoFilterFingerprint.result!!
|
override fun close() = LithoFilterFingerprint.result!!
|
||||||
.mutableMethod.addInstructions(
|
.mutableMethod.replaceInstruction(0, "const/16 v0, $filterCount")
|
||||||
0, """
|
|
||||||
const/16 v1, $filterCount
|
|
||||||
new-array v2, v1, [$COMPONENTS_PATH/Filter;
|
|
||||||
const/4 v1, 0x1
|
|
||||||
"""
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,7 @@ import com.android.tools.smali.dexlib2.AccessFlags
|
|||||||
|
|
||||||
object LithoFilterFingerprint : MethodFingerprint(
|
object LithoFilterFingerprint : MethodFingerprint(
|
||||||
returnType = "V",
|
returnType = "V",
|
||||||
accessFlags = AccessFlags.STATIC or AccessFlags.CONSTRUCTOR,
|
accessFlags = AccessFlags.PUBLIC or AccessFlags.STATIC or AccessFlags.CONSTRUCTOR,
|
||||||
customFingerprint = { methodDef, _ ->
|
customFingerprint = { methodDef, _ ->
|
||||||
methodDef.definingClass == "Lapp/revanced/integrations/patches/components/LithoFilterPatch;"
|
methodDef.definingClass == "Lapp/revanced/integrations/patches/components/LithoFilterPatch;"
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user