refactor: integrations (#44)

This commit is contained in:
Joey Peter
2022-06-24 00:17:49 +02:00
committed by GitHub
parent d5597fb002
commit ccf0218b6c
12 changed files with 18 additions and 19 deletions
@@ -249,7 +249,7 @@ class GeneralBytecodeAdsPatch : BytecodePatch(
val block2 = """
move-object/from16 v1, p3
iget-object v2, v1, $templateNameParameterType->b:Ljava/nio/ByteBuffer;
invoke-static {v0, v2}, Lfi/razerman/youtube/litho/LithoAdRemoval;->containsAd(Ljava/lang/String;Ljava/nio/ByteBuffer;)Z
invoke-static {v0, v2}, Lapp/revanced/integrations/patches/GeneralBytecodeAdsPatch;->containsAd(Ljava/lang/String;Ljava/nio/ByteBuffer;)Z
move-result v1
""".trimIndent().toInstructions(lithoMethod)
val block3 = """
@@ -42,7 +42,7 @@ class VideoAdsPatch : BytecodePatch(
// Override the parameter by calling shouldShowAds and setting the parameter to the result
result.method.addInstructions(
0, """
invoke-static { }, Lfi/vanced/libraries/youtube/whitelisting/Whitelist;->shouldShowAds()Z
invoke-static { }, Lapp/revanced/integrations/patches/VideoAdsPatch;->shouldShowAds()Z
move-result v1
"""
)