mirror of
https://github.com/revanced/revanced-patches
synced 2024-11-19 15:49:24 +01:00
refactor: remove trimIndent
before compiling instructions
This commit is contained in:
parent
9329b7323a
commit
a7ee89d497
@ -244,20 +244,20 @@ class GeneralBytecodeAdsPatch : BytecodePatch(
|
||||
val block1 = """
|
||||
invoke-static/range {p3}, $thisType->getTemplateName($templateNameParameterType)Ljava/lang/String;
|
||||
move-result-object v0
|
||||
""".trimIndent().toInstructions(lithoMethod)
|
||||
""".toInstructions(lithoMethod)
|
||||
val block2 = """
|
||||
move-object/from16 v1, p3
|
||||
iget-object v2, v1, $templateNameParameterType->b:Ljava/nio/ByteBuffer;
|
||||
invoke-static {v0, v2}, Lapp/revanced/integrations/patches/GeneralBytecodeAdsPatch;->containsAd(Ljava/lang/String;Ljava/nio/ByteBuffer;)Z
|
||||
move-result v1
|
||||
""".trimIndent().toInstructions(lithoMethod)
|
||||
""".toInstructions(lithoMethod)
|
||||
val block3 = """
|
||||
move-object/from16 v2, p1
|
||||
invoke-static {v2}, $descriptor1
|
||||
move-result-object v0
|
||||
iget-object v0, v0, $descriptor2
|
||||
return-object v0
|
||||
""".trimIndent().toInstructions(lithoMethod)
|
||||
""".toInstructions(lithoMethod)
|
||||
|
||||
// insert blocks and branch instructions
|
||||
lithoMethodImplementation.insertBlocks(
|
||||
@ -368,7 +368,7 @@ class GeneralBytecodeAdsPatch : BytecodePatch(
|
||||
const v0, $lithoConstant
|
||||
invoke-static {p0, v0}, ${descriptors[1]}
|
||||
move-result-object p0
|
||||
""".trimIndent().toInstructions()
|
||||
""".toInstructions()
|
||||
val block2 = """
|
||||
invoke-static {p0}, ${descriptors[2]}
|
||||
move-result-object p0
|
||||
@ -376,12 +376,12 @@ class GeneralBytecodeAdsPatch : BytecodePatch(
|
||||
move-result-object v0
|
||||
invoke-static {v0}, ${this.type}->getIsEmpty(Ljava/lang/String;)Z
|
||||
move-result v0
|
||||
""".trimIndent().toInstructions()
|
||||
""".toInstructions()
|
||||
val block3 = """
|
||||
invoke-virtual {p0}, ${descriptors[3]}
|
||||
move-result-object p0
|
||||
return-object p0
|
||||
""".trimIndent().toInstructions()
|
||||
""".toInstructions()
|
||||
|
||||
// create target instruction
|
||||
val targetInstruction = BuilderInstruction11n(Opcode.CONST_4, 1, 0)
|
||||
|
@ -59,7 +59,7 @@ class IntegrationsPatch : BytecodePatch(
|
||||
invoke-static { }, Lapp/revanced/integrations/utils/Globals;->getAppContext()Landroid/content/Context;
|
||||
move-result-object v0
|
||||
return-object v0
|
||||
""".trimIndent().toInstructions(), null, null
|
||||
""".toInstructions(), null, null
|
||||
)
|
||||
).toMutable()
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user