fix: migrate patches to latest patcher api changes

This commit is contained in:
oSumAtrIX
2022-06-01 01:40:57 +02:00
parent f55ad46322
commit 39cf505d84
14 changed files with 65 additions and 18 deletions
@@ -17,9 +17,10 @@ import app.revanced.patcher.signature.implementation.method.annotation.MatchingM
import app.revanced.patcher.util.smali.toInstructions
import app.revanced.patches.youtube.ad.video.annotations.VideoAdsCompatibility
import app.revanced.patches.youtube.ad.video.signatures.ShowVideoAdsConstructorSignature
import app.revanced.patches.youtube.misc.integrations.patch.IntegrationsPatch
import org.jf.dexlib2.AccessFlags
@Patch
@Patch(dependencies = [IntegrationsPatch::class])
@Name("video-ads")
@Description("Patch to remove ads in the YouTube video player.")
@VideoAdsCompatibility
@@ -37,7 +38,6 @@ class VideoAdsPatch : BytecodePatch(
"V", AccessFlags.PUBLIC or AccessFlags.FINAL, listOf("Z"), null
) {}) ?: return PatchResultError("Required parent method could not be found.")
// Override the parameter by calling shouldShowAds and setting the parameter to the result
result.method.implementation!!.addInstructions(
0, """